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

Port should be configured in docker-compose.yml as strings #550

Closed
sangeethah opened this issue Apr 17, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@sangeethah
Copy link
Member

commented Apr 17, 2015

Server Version - V0.16.3

Steps to reproduce the problem:

Create an environment.
Create a service in this environment by specifying a port map.

The docker-compose.yml for this service has the ports specified as follows:

ports:
  - 8090:80/tcp

Following is the recommendation:

"Note: When mapping ports in the HOST:CONTAINER format, you may experience erroneous results when using a container port lower than 60, because YAML will parse numbers in the format xx:yy as sexagesimal (base 60). For this reason, we recommend always explicitly specifying your port mappings as strings."

@alena1108

This comment has been minimized.

Copy link
Member

commented Apr 17, 2015

Unfortunately, this problem is not trivial to solve. Unless the value has trailing or ending spaces, its not surrounded by quotes. If I change the formatter properties to set the scalarType to double or single quotes, it applies to all the entires in the compose file. In other words, you will see something like:

image: "ubuntu"
ports

  • "80:80"

While docker-compose tool expects to see mix and match of the both:

image: ubuntu - no quotes
ports

  • "80:80" - quotes

We can document it for now

@vincent99 vincent99 changed the title [Services] - Port should be configured in docker-compose.yml as strings. Port should be configured in docker-compose.yml as strings Apr 23, 2015

@deniseschannon

This comment has been minimized.

Copy link
Member

commented Dec 3, 2015

Functionality not broken, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.