compose icon indicating copy to clipboard operation
compose copied to clipboard

port mapping to outside world not working

Open gregwebs opened this issue 12 years ago • 9 comments

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

gregwebs avatar Mar 11 '14 23:03 gregwebs

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?

mauvm avatar Mar 12 '14 09:03 mauvm

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.

gregwebs avatar Mar 12 '14 23:03 gregwebs

Would be good to get to the bottom of this – thanks for reporting. What was your fig.yml?

bfirsh avatar Mar 13 '14 12:03 bfirsh

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"

ccc-ccc-ttt avatar Sep 04 '14 00:09 ccc-ccc-ttt

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.

ccc-ccc-ttt avatar Sep 04 '14 01:09 ccc-ccc-ttt

I have the same problem here using fig 0.5.2.

anarcher avatar Sep 08 '14 21:09 anarcher

I have the same problem here using fig 0.5.2.

esnunes avatar Sep 15 '14 23:09 esnunes

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.

esnunes avatar Sep 16 '14 00:09 esnunes

Fixed by #485

bfirsh avatar Sep 16 '14 21:09 bfirsh