Compose: Invalid published port in 1.14.0

Created on 6 Jul 2017  路  2Comments  路  Source: docker/compose

Part of my docker-compose (Docker for Mac):

expose: 
  - "12201/udp"
  - "1514/udp"
ports:
  - "9000:9000"
  - "12201/udp:12201/udp"
  - "1514/udp:1514/udp"

When I run docker-compose up -d I get an console error: ERROR: Invalid published port: 12201/udp
It is greylog container so I do need to define and expose both 12201 and 1514 as "UDP"

When I do:

expose: 
  - "12201/udp"
  - "1514/udp"
ports:
  - "9000:9000"
  - "12201:12201/udp"
  - "1514:1514/udp"

Error disappear but the Greylog container does not work for me.
The weird thing is that the configuration I put at the top of this Issue works for some other people in my team but not me.

kinquestion

Most helpful comment

The "12201/udp:12201/udp" notation is invalid, and was probably getting discarded silently by the engine before. The second configuration is correct. If the app doesn't work, it's probably because of some other, unrelated reason.

All 2 comments

The "12201/udp:12201/udp" notation is invalid, and was probably getting discarded silently by the engine before. The second configuration is correct. If the app doesn't work, it's probably because of some other, unrelated reason.

@shin- Thanks man

Was this page helpful?
0 / 5 - 0 ratings