-
-
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
add quotation around ports in docker-compose.yml #3090
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3090 +/- ##
==========================================
- Coverage 33.3% 33.26% -0.04%
==========================================
Files 273 273
Lines 39954 39954
==========================================
- Hits 13305 13290 -15
- Misses 24753 24763 +10
- Partials 1896 1901 +5
Continue to review full report at Codecov.
|
@bibaijin any rule reference link from docker? |
@lunny Here is the example from docker-compose, although not described explicitly, all of the example port items is enclosed by quotation. And docker/compose#3109 describe this same problem, the solution is adding quotation. Actually, it's related to yaml specification, not to docker-compose file specification. Here is yaml's referrence for int, in which colon expression is mentioned. |
LGTM |
LGTM |
Without quotation around ports in docker-compose.yml, an error will occur when
docker-compose up
:According to yaml's specification,
:
is a special mark, which denotes map, so quotation is necessary to avoid ambiguity.