cloudflare / cloudflare/cloudflared
🐛 Docker command does not load as an array
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
container fails to load the binary and parameters when I use a YAML array for command:
I use docker-compose to create stacks of containers, I have templated how I layout networks, services etc... I use a YAML array for the command: section because some containers (like Traefik) have a lot of command parameters, and generally it makes the YAML easier to manage.
I've not had issues with that with any other container but cloudflared does not like it. The full command is shown in the container details but the logs show the binary is outputting a help screen of the parameter options to load it properly.
**To Reproduce**
This compose works as expected
`services:
cloudflared:
container_name: cloudflared
command: tunnel --no-autoupdate run --token-file /run/secrets/cloudflare_tunnel_token
image: cloudflare/cloudflared:latest
networks:
dmz:
proxy_in:
restart: unless-stopped
security_opt:
- no-new-privileges=true
secrets:
- cloudflare_tunnel_token`
This compose does not load the binary in the container, logs show the help screen
`services:
cloudflared:
container_name: cloudflared
command:
- tunnel
- --no-autoupdate run
- --token-file /run/secrets/cloudflare_tunnel_token
image: cloudflare/cloudflared:latest
networks:
dmz:
proxy_in:
restart: unless-stopped
security_opt:
- no-new-privileges=true
secrets:
- cloudflare_tunnel_token`
Container details shown in Portainer
ENTRYPOINT cloudflared --no-autoupdate
CMD tunnel --no-autoupdate run --token-file /run/secrets/cloudflare_tunnel_token
**Expected behavior**
Docker does render/understand the YAML array, if I look at the container it shows the command with all the parameters formatted the same as without the YAML array. I would expect cloudflared to load properly with or without using a YAML array.
**Environment and versions**
- OS: TrueNAS Scale 24.10.2.2 - Docker Standalone 27.1.1 on Debian 12 (bookworm)
- Architecture: x86_64
- Version: Docker image dated 2025-07-04 05:18:12 with hash sha256:2ac4ea6f0b39224ca2e666e0c595cc02e93a4aec7ce1322ec3b537a7f7f9b307
**Logs and errors**
If applicable, add logs or errors to help explain your problem.
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.