-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Port ranges #1827
Port ranges #1827
Conversation
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
LGTM. @uvgroovy @mnowster: Thanks team! |
Yay! Yes, thank you @uvgroovy for your helpful contribution ✨ |
why is this missing in 1.8.0-rc1 (build 9bf6bc9 )? OSX: Native Docker Version 1.12.0-rc2-beta16 (build: 9493) Edit: I am experiencing the issue when defining port ranges like so: docker-compose.yml snippet
|
@tequilaskywalk This has been in Compose for several versions now. I just tried your example on Docker for Mac and it crashed the VM. My guess would be that simultaneously binding 1001 ports puts a bit of a strain on it. |
This still seems to be an issue for me? Am I [example] cat docker-compose.yml
# PHP Web Server
web:
# Build the Drupal 8 image
# https://hub.docker.com/r/_/drupal/
image: drupal:8
# Environment variables
environment:
# Drupal settings
DRUPAL_PROFILE: standard
DRUPAL_SITE_NAME: Drupal
DRUPAL_USER: admin
DRUPAL_PASS: admin
DRUPAL_DBURL: mysql://drupal:drupal@database:3406/drupal
ports:
# Host machine's port 8000 will map to Drupal's port 80
- "8000-8100:80"
volumes:
# Drupal should live in the "drupal" directory
- ./drupal:/app
links:
- database:database
command: php -S 0.0.0.0:80 -t /app
working_dir: /app
restart: always
# MySQL Server
database:
image: mysql:5
environment:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
- "3306-3406:3306"
volumes:
- ./mysql:/var/lib/mysql
restart: always
[example] docker-compose up
ERROR: The Compose file './docker-compose.yml' is invalid because:
database.ports is invalid: Port ranges don't match in length
web.ports is invalid: Port ranges don't match in length
[example] docker-compose --version
docker-compose version 1.7.1, build 0a9ab35
[example] docker --version
Docker version 1.11.2, build b9f10c9 |
@ellioseven We don't yet support mapping a range on the host to a single container port. This is tracked in #3150. |
Add port range support to docker compose.
Allows us to remove our split_port function and use docker-py's split_port function.