简体   繁体   中英

Azure App Service with Container not respecting docker-compose syntax for port forwarding with udp

BLUF: How do I get port-forwarding with the UDP protocol in a docker-compose app within an azure app service.

Please read this entirely before responding. The docker documentation's port forwarding works fine... until I try it in an azure app service.

I have a docker-compose file that I use in an azure app service. This works:

    ports:
      - "2456-2458:2456-2458"

This does not.

    ports:
      - "2456-2458:2456-2458/udp"

I have tried listing them out

    ports:
      - "2456:2456/udp"
      - "2457:2457/udp"
      - "2458:2458/udp"

And I have tried with no quotations, single quotations, and double quotations.

According to the docker-compose documentation, /udp should work. According to others' githubs, there's works. But when I run it, my container logs show this:

2021-02-22T18:10:09.297Z INFO  - Starting multi-container app..
2021-02-22T18:10:09.298Z ERROR - Exception in multi-container config parsing: Exception: System.FormatException, Msg: Input string was not in a correct format.
2021-02-22T18:10:09.300Z ERROR - Start multi-container app failed
2021-02-22T18:10:09.303Z INFO  - Stopping site valheim because it failed during startup.

I've read a lot of blogs and articles to try and figure this out, but no one seems to have an issue. The only difference I see is I am using an app service. So I have to ask, has anyone gotten the udp protocol to work with their app service, and if so, can you share the syntax? Their tutorial and documentation use ports, port forwarding, but never the udp protocol. So it's not apples to apples.

Unfortunately Azure App Service does not support property ports ( ports other than 80 and 8080 (ignored) ) in Docker Compose.

Here is a list of supported/not supported Docker Compose options in Azure App Service.

https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#docker-compose-options

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM