Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish to specified ip? #194

Closed
b0c1 opened this issue May 23, 2015 · 5 comments
Closed

publish to specified ip? #194

b0c1 opened this issue May 23, 2015 · 5 comments

Comments

@b0c1
Copy link

b0c1 commented May 23, 2015

Hi!

I tried to publish elasticsearch to 127.0.0.1:9200:9200 but it's still published to 0.0.0.0 how can I avoid this? docker run with --iptables=true --icc=false options..

Any idea?

@michaelsauter
Copy link
Owner

Could be a bug. Can you paste the relevant line from your crane config and the output that Crane gives you if you run it in verbose mode (-v)?

@michaelsauter
Copy link
Owner

Close due to inactivity. Please reopen if this is still an issue.

@falzm
Copy link

falzm commented Feb 20, 2016

Hi

I'm facing the same issue here with the latest version (2.5.2): I specifically bind an exposed port to the host loopback, but it looks like it's ignored by crane (running container exposed port ends up not mapped at all). I'm also running Docker with --icc=false option.

My configuration is:

containers:
  ghost-XXX:
    image: "ghost:0.7.6"
    volume:
      - "/etc/localtime:/etc/localtime:ro"
      - "/home/marc/www/XXX/ghost:/var/lib/ghost"
    publish:
      - "127.0.0.1:2368:2368"

Creating then starting the container:

marc@carbon:~/docker% crane create -v ghost-XXX
Using configuration file `/home/marc/docker/crane.yaml`
Command will be applied to: ghost-XXX

Creating container ghost-XXX ...

--> docker create --name ghost-XXX ghost:0.7.6
27445e57ea538f4431bc2273463d366b9a9cd6107bf338411a6a820b9d584173

marc@carbon:~/docker% crane start -v ghost-XXX
Using configuration file `/home/marc/docker/crane.yaml`
Command will be applied to: ghost-XXX

Starting container ghost-XXX ...

--> docker start ghost-XXX
ghost-XXX
marc@carbon:~/docker% docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS               NAMES
27445e57ea53        ghost:0.7.6         "/entrypoint.sh npm s"   About a minute ago   Up 3 seconds        2368/tcp            ghost-XXX

If I create the container manually it works and binds the port on the specified host address.

Let me know if you need me to provide more details.

@bjaglin
Copy link
Collaborator

bjaglin commented Feb 20, 2016

@falzm volume/publish parameters should be under the run section. Try:

containers:
  ghost-XXX:
    image: ghost:0.7.6
    run:
      volume:
        - /etc/localtime:/etc/localtime:ro
        - /home/marc/www/XXX/ghost:/var/lib/ghost
      publish:
        - 127.0.0.1:2368:2368

Lack of warning when parameters are in the wrong section is a known problem :(

@falzm
Copy link

falzm commented Feb 20, 2016

Oh well... Thank you, works much better indeed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants