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

Controller does not come up when port 8080 is not bound #42

Closed
pfried opened this issue Jun 21, 2017 · 7 comments
Closed

Controller does not come up when port 8080 is not bound #42

pfried opened this issue Jun 21, 2017 · 7 comments

Comments

@pfried
Copy link

pfried commented Jun 21, 2017

Is it possible to startup the container without all ports bound on the host?

It seems to me that if i do only bind port 8443 (for testing only) the container does not come up. Is there any reason for this?

I know i need more or all of the ports in production, but i do have other containers running on the same host using these ports already (8080)

@jacobalberty
Copy link
Owner

It runs fine with only specific ports bound, what does docker ps say about the ports for the running container?

@pfried
Copy link
Author

pfried commented Jun 21, 2017

It does not bind them somehow, usually i get an error if the ports cannot be bound. But this then may be a docker specific error:

The command i am running:
sudo docker run --rm -d -p 8442:8443 --net=host -v ~/unifi/data:/var/lib/unifi -v ~/unifi/logs:/var/log/unifi -v ~/unifi/run:/var/run/unifi --name unifi jacobalberty/unifi:unifi5

@pfried
Copy link
Author

pfried commented Jun 21, 2017

Thank you for the quick response, i think this issue is not related to this project, binding to the host network and specifying the ports may have some problems, if i do not specify the ports they get bound correctly to a ephemeral port range

@pfried pfried closed this as completed Jun 21, 2017
@JohnnyMaccarone
Copy link

I actually have the same problem. Everything works until I try to bind the ports to the non-standard ones.
While I use the same command as pfried, I also don't see any ports being mapped when I check with 'docker ps'.
(I would need to run 10 containers on the same box, so changing those ports is required).

Not sure how to accomplish this.

@jacobalberty
Copy link
Owner

@JohnnyMaccarone If you need to run 10 containers mapping all of those ports may be a bit heavier than you should be doing. You should look into some of the more advanced docker networking options. Specifically the macvlan networking driver allows you to give containers routable ips.

https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/

@JohnnyMaccarone
Copy link

Thanks for your quick response !
I'll have a look into your suggestion.
Cheers.

@pfried
Copy link
Author

pfried commented Jul 6, 2017

I did attach the container to a macvlan, a very helpful article on this issue:
http://collabnix.com/docker-17-06-swarm-mode-now-with-macvlan-support/

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

3 participants