4 ms·
Not sure about sharing port numbers - you can do something like: docker -d -p 80:8000 repo/container isn't this good enough? Can you give more detailed exam
by ay1n 11y ago
Not sure about sharing port numbers - you can do something like:
docker -d -p 80:8000 repo/container
isn't this good enough? Can you give more detailed example?
- otterley 11y agoHow does that help? All this does is establish a local PAT; you can still only bind one application to port 80 on on the host. If you have more than one service that needs to listen to port 80 and be reached by clients, you're still out of luck.
- curun1r 11y agoThis is a pretty easy solve...haproxy + consul + consul-template allows you to spin up a new container, register it with consul and have the consul-template watcher regenerate the haproxy config to route to the new port. It's a little overkill if you're running it on a single machine, but in a real production environment, it's a pretty lightweight solution.
- otterley 11y agoEasy in theory, but in practice, you have to configure and monitor it all. Adding components and orchestration logic is not cost-free.
- coffeemaker 11y agoWell it's not so hard. If there is good document steps for it. It's really abut getting consul working right.