Remove shell entrypoint override from coturn - use native image entrypoint

The coturn/coturn image has its own docker-entrypoint.sh that handles
arg parsing. Overriding it with /bin/sh -c adds a failure point.
Now passing args as a clean list directly to the native entrypoint.

Also drops --external-ip for now (added back once coturn starts).

https://claude.ai/code/session_01Vm6NLaQuzM4VosAotqS1q8
This commit is contained in:
Claude
2026-02-23 20:18:22 +00:00
parent 37765f4569
commit 8a14b3eded
+15 -26
View File
@@ -82,33 +82,22 @@ services:
image: coturn/coturn:latest image: coturn/coturn:latest
container_name: easy-asterisk-coturn container_name: easy-asterisk-coturn
network_mode: host network_mode: host
# Pass env vars into container, then use simple shell to build command # Uses the image's native docker-entrypoint.sh (no shell override)
environment: # which prepends 'turnserver' when first arg starts with '-'
- TURN_USER=${TURN_USERNAME:-easyasterisk}
- TURN_PASS=${TURN_PASSWORD:-changeme}
- REALM=${DOMAIN_NAME:-localhost}
- MIN_PORT=${TURN_RELAY_MIN:-49152}
- MAX_PORT=${TURN_RELAY_MAX:-49252}
- EXT_IP=${PUBLIC_IP:-}
entrypoint: ["/bin/sh", "-c"]
command: command:
- | - -n
EXTRA="" - --listening-port=3478
if [ -n "$EXT_IP" ]; then - --fingerprint
EXTRA="--external-ip=$EXT_IP" - --lt-cred-mech
fi - --user=${TURN_USERNAME:-easyasterisk}:${TURN_PASSWORD:-changeme}
exec turnserver -n \ - --realm=${DOMAIN_NAME:-localhost}
--listening-port=3478 \ - --min-port=${TURN_RELAY_MIN:-49152}
--fingerprint \ - --max-port=${TURN_RELAY_MAX:-49252}
--lt-cred-mech \ - --no-tls
--user=$TURN_USER:$TURN_PASS \ - --no-dtls
--realm=$REALM \ - --no-cli
--min-port=$MIN_PORT \ - --no-multicast-peers
--max-port=$MAX_PORT \ - --log-file=stdout
--no-tls --no-dtls --no-cli \
--no-multicast-peers \
--log-file=stdout \
$EXTRA
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "turnutils_stunclient 127.0.0.1 >/dev/null 2>&1"] test: ["CMD-SHELL", "turnutils_stunclient 127.0.0.1 >/dev/null 2>&1"]