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

Allow running up without binding on ports. #6443

Closed
pauldraper opened this issue Jan 7, 2019 · 1 comment
Closed

Allow running up without binding on ports. #6443

pauldraper opened this issue Jan 7, 2019 · 1 comment

Comments

@pauldraper
Copy link

pauldraper commented Jan 7, 2019

Is your feature request related to a problem? Please describe.

Sometimes, I need to run multiple stacks for testing in parallel.

However, containers fail to launch if published ports conflict.

Describe the solution you'd like

I'd like docker-compose up to be able to run without publish ports. A --service-ports=false option.

Describe alternatives you've considered

I've considered using docker run, however it has other differences that make it not work, like not giving it a hostname on the network.

I've considered using extends, but that doesn't work with depends_on (#3220).

I've considered using YAML anchors but that still more verbose that I'd prefer for something as simple as choosing whether to publish ports or not.

I've considered removing ports with a override file, but that can't be done #3729

I've considered adding ports with a docker-compose.override.yml but I prefer that to be reserved for per-user edits, and I prefer to keep vanilla docker-compose working well.

Additional context

docker-compose run already has the --service-ports flag.

@ulyssessouza
Copy link
Collaborator

I would consider using docker-app.
More specifically, docker-app render --set option so you can replace fixed port by a variable, then you just have to run each of your stacks with different values.

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