I have a case where when I use docker run with "-p 1080:1080" then port 1080 is exposed and accessible from host. But when I configure the same container in fuge and run, that port is not exposed.
Below is my fuge config for this service:
worker1:
image: dsworker:123.71
type: container
environment:
POLL_MESSAGE_COUNT=1
ports:
worker1=1080:1080
When i do docker ps, it does not show any ports exposed.
As mentioned before, executing docker run with -p shows the port correctly in docker ps command.
After going through the docker api for create container, looks like the ExposedPorts command is at the config level and not under HostConfig. When I changed this from (in dockerRunner.js):
Then the port is correctly getting exposed on the host and I can access my service.
Is this a bug in fuge runner?
I found further that the docker file used to generate the container does not EXPOSE this port 1080. We are working to have that fixed. But still, when docker run can work correctly, fuge should also work. I think the fix above addresses this use-case.
I have a case where when I use docker run with "-p 1080:1080" then port 1080 is exposed and accessible from host. But when I configure the same container in fuge and run, that port is not exposed. Below is my fuge config for this service: worker1: image: dsworker:123.71 type: container environment:
When i do docker ps, it does not show any ports exposed. As mentioned before, executing docker run with -p shows the port correctly in docker ps command.
After going through the docker api for create container, looks like the ExposedPorts command is at the config level and not under HostConfig. When I changed this from (in dockerRunner.js):
to
Then the port is correctly getting exposed on the host and I can access my service. Is this a bug in fuge runner?
I found further that the docker file used to generate the container does not EXPOSE this port 1080. We are working to have that fixed. But still, when docker run can work correctly, fuge should also work. I think the fix above addresses this use-case.