port mapping to outside world not working
Using fig version 0.3.2 and 0.3.1, I have "3000:3000" in my fig.yml but after running sudo fig up web /bin/bash, the command sudo docker ps only shows 3000/tcp with no mapping to the outside world
Can you provide some context? What is it that you are trying to accomplish?
Have you tried running fig ps on the host machine? Does its output contain something like 3000:3000/tcp?
I was able to get crane to work with less effort than fig. Hopefully if someone else runs into this issue they will end up here.
Would be good to get to the bottom of this – thanks for reporting. What was your fig.yml?
I have the same problem here using fig 0.5.2. fig ps only shows 8080/tcp.
My fig.yml:
web:
# Need to declare HOME variable to npm
environment:
HOME: /home/dev
build: .
volumes:
- .:/home/dev
working_dir: /home/dev
user: dev
ports:
- "8000:8000"
I got it to work but I don't know if this behavior is right. If I start an app using fig run web my_app port mapping does not work, but if I put command: my_app in my fig.yml and run fig up port mapping works.
I have the same problem here using fig 0.5.2.
I have the same problem here using fig 0.5.2.
I figured out the problem, the lines below set None to ports:
- https://github.com/docker/fig/blob/master/fig/cli/main.py#L290
- https://github.com/docker/fig/blob/master/fig/cli/main.py#L293
I just removed ports=None and it worked perfect on "run".
I got surprised that the "up" command doesn't use the same strategy of "run" command.
Fixed by #485