stephenh / mirror

A tool for real-time, two-way sync for remote (e.g. desktop/laptop) development
Apache License 2.0
391 stars 37 forks source link

Can we use the diff port instead of '49172'? #53

Closed rameshar16 closed 4 years ago

rameshar16 commented 4 years ago

Can we use the diff port instead of '49172'?

stephenh commented 4 years ago

Yes, both the mirror client and mirror server commands accept a -p 1234 port argument.

rameshar16 commented 4 years ago

Thank you @stephenh for your quick response.

rameshar16 commented 4 years ago

Hi @stephenh,

I have added the "--expose 5001 -p 5001:5001 " to the docker run command, but still, I am seeing the container is running with the default port '49172'. PFB log entry for your reference. Please let me know if I missed anything here and help with fixing the issue.

2020-03-26 08:34:32 INFO Listening on 0.0.0.0:49172, version unspecified

Thanks and Regards, Ramesh

stephenh commented 4 years ago

I do not regularly run the docker command, but the -p your passing is being interpretted as a docker parameter and not a parameter that is passed to mirror that is running within docker.

If you want 5001 on your local machine to be used, you can leave mirror running on 49182 within docker, and then just map 49172 -> 5001, i.e. something like:

docker run --rm --init -it -u $(id -u):$(id -g) -v $(pwd):/data -p 5001:49172 \
  quay.io/stephenh/mirror server

Or maybe swap the 5001/49172, not sure what the right order is.

rameshar16 commented 4 years ago

Thank you @stephenh