Skip to content

CADDY_ADMIN=off is invalid #681

Description

@Rashnan

Steps To Reproduce

  1. Copy/Re-create the docker-compose and Dockerfile
  2. Then do podman-compose up.

Caddyfile

{
    frankenphp
    # admin off
}

# in theory can reproduce issue even without this block
http://localhost:8080 {
    root * /app
    encode gzip

    # php_server

    file_server browse
}

docker-compose.yaml

Im pasting the same code i used to originally get this issue but i was able to replicate this issue with purely the frankenphp images in both php and php-dev directly.

services:
  app:
    image: localhost/myimage:latest
    container_name: app
    volumes:
      - ./Caddyfile:/etc/frankenphp/Caddyfile
    ports:
      - "8080:8080"

Dockerfile

FROM docker.io/serversideup/php-dev:645-frankenphp-alpine

USER root

RUN install-php-extensions \
    pdo_mysql \
    mysqli

USER www-data

Outcome

What did you expect?

Frankenphp should start

❯ podman-compose up
7dffdf4436aca61647a487e60b6bf70bff28c7f238e8cb44d5930e408ecb7804
4e20b13f3bc6cfc4f302cc90ba55346727e7c93c184246ba05fe6d003980ed10
[app] |
[app] | --------------------------------------------------------------------
[app] |  ____                             ____  _     _        _   _
[app] | / ___|  ___ _ ____   _____ _ __  / ___|(_) __| | ___  | | | |_ __
[app] | \___ \ / _ \  __\ \ / / _ \  __| \___ \| |/ _` |/ _ \ | | | |  _ \
[app] |  ___) |  __/ |   \ V /  __/ |     ___) | | (_| |  __/ | |_| | |_) |
[app] | |____/ \___|_|    \_/ \___|_|    |____/|_|\__,_|\___|  \___/| .__/
[app] |                                                             |_|
[app] |
[app] | Brought to you by serversideup.net
[app] | --------------------------------------------------------------------
[app] |
[app] | 📚 Documentation: https://serversideup.net/php/docs
[app] | 💬 Get Help: https://serversideup.net/php/community
[app] | 🙌 Sponsor: https://serversideup.net/sponsor
[app] |
[app] | -------------------------------------
[app] | ℹ️ Container Information
[app] | -------------------------------------
[app] | 📦 Versions
[app] | • Image:         git-bce488c-25964321868
[app] | • PHP:           8.5.6
[app] | • OS:            Alpine Linux v3.23
[app] |
[app] | 👤 Container User
[app] | • User:          www-data
[app] | • UID:           82
[app] | • GID:           82
[app] |
[app] | ⚡ Performance
[app] | • OPcache:       ❌ Disabled
[app] | • Memory Limit:  256M
[app] | • Upload Limit:  100M
[app] |
[app] | 🔄 Runtime
[app] | • Automations:
[app] | • Docker CMD:    frankenphp run --config /etc/frankenphp/Caddyfile --adapter caddyfile
[app] |
[app] | 👉 [NOTICE]: Improve PHP performance by setting PHP_OPCACHE_ENABLE=1 (recommended for production).
[app] | {"level":"info","ts":1782326731.4531188,"msg":"maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined"}
[app] | {"level":"info","ts":1782326731.453132,"msg":"GOMEMLIMIT is updated","GOMEMLIMIT":14514171494,"previous":9223372036854775807}
[app] | {"level":"info","ts":1782326731.4531376,"msg":"using config from file","file":"/etc/frankenphp/Caddyfile"}
[app] | {"level":"info","ts":1782326731.4531415,"msg":"adapted config to JSON","adapter":"caddyfile"}
[app] | {"level":"warn","ts":1782326731.4531443,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/frankenphp/Caddyfile","line":2}
[app] | {"level":"warn","ts":1782326731.4531503,"logger":"admin","msg":"admin endpoint disabled"}
[app] | {"level":"info","ts":1782326731.453319,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x193866d92980"}
[app] | {"level":"info","ts":1782326731.49321,"logger":"frankenphp","msg":"FrankenPHP started 🐘","php_version":"8.5.6","num_threads":32,"max_threads":32,"max_requests":0}
[app] | {"level":"warn","ts":1782326731.4938092,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":8080"}
[app] | {"level":"warn","ts":1782326731.493865,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":8080"}
[app] | {"level":"info","ts":1782326731.493872,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
[app] | {"level":"info","ts":1782326731.4942858,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
[app] | {"level":"info","ts":1782326731.4942987,"msg":"serving initial configuration"}
[app] | {"level":"info","ts":1782326731.4954305,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/data/caddy"}
[app] | {"level":"info","ts":1782326731.4964447,"logger":"tls","msg":"finished cleaning storage units"}

What happened instead?

Frankenphp did not start and failed with a lookup for "off".

❯ podman-compose up

85a964c3f8b0b92f6b0a3b236ca5abf24787f8a1cc108235939e222cf9c1cbfd
Error: creating container storage: the container name "app" is already in use by 61b6104b835350fbd23a174271dcc0f6725d6a22cdb7e19ba102dbb751c505f8. You have to remove that container to be able to reuse that name: that name is already in use, or use --replace to instruct Podman to do so.
[app] | time="2026-06-24T23:40:39+05:00" level=warning msg="Requested oom_score_adj=0 is lower than the current one, changing to 200"
[app] |
[app] | --------------------------------------------------------------------
[app] |  ____                             ____  _     _        _   _
[app] | / ___|  ___ _ ____   _____ _ __  / ___|(_) __| | ___  | | | |_ __
[app] | \___ \ / _ \  __\ \ / / _ \  __| \___ \| |/ _` |/ _ \ | | | |  _ \
[app] |  ___) |  __/ |   \ V /  __/ |     ___) | | (_| |  __/ | |_| | |_) |
[app] | |____/ \___|_|    \_/ \___|_|    |____/|_|\__,_|\___|  \___/| .__/
[app] |                                                             |_|
[app] |
[app] | Brought to you by serversideup.net
[app] | --------------------------------------------------------------------
[app] |
[app] | 📚 Documentation: https://serversideup.net/php/docs
[app] | 💬 Get Help: https://serversideup.net/php/community
[app] | 🙌 Sponsor: https://serversideup.net/sponsor
[app] |
[app] | -------------------------------------
[app] | ℹ️ Container Information
[app] | -------------------------------------
[app] | 📦 Versions
[app] | • Image:         git-bce488c-25964321868
[app] | • PHP:           8.5.6
[app] | • OS:            Alpine Linux v3.23
[app] |
[app] | 👤 Container User
[app] | • User:          www-data
[app] | • UID:           82
[app] | • GID:           82
[app] |
[app] | ⚡ Performance
[app] | • OPcache:       ❌ Disabled
[app] | • Memory Limit:  256M
[app] | • Upload Limit:  100M
[app] |
[app] | 🔄 Runtime
[app] | • Automations:
[app] | • Docker CMD:    frankenphp run --config /etc/frankenphp/Caddyfile --adapter caddyfile
[app] |
[app] | 👉 [NOTICE]: Improve PHP performance by setting PHP_OPCACHE_ENABLE=1 (recommended for production).
[app] | {"level":"info","ts":1782326439.4811006,"msg":"maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined"}
[app] | {"level":"info","ts":1782326439.481115,"msg":"GOMEMLIMIT is updated","GOMEMLIMIT":14514171494,"previous":9223372036854775807}
[app] | {"level":"info","ts":1782326439.481121,"msg":"using config from file","file":"/etc/frankenphp/Caddyfile"}
[app] | {"level":"info","ts":1782326439.481125,"msg":"adapted config to JSON","adapter":"caddyfile"}
[app] | {"level":"warn","ts":1782326439.4811282,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/frankenphp/Caddyfile","line":2}
[app] | Error: loading initial config: loading new config: starting caddy administration endpoint: listen tcp: lookup off on 10.89.0.1:53: no such host

Note. This is a follow up from: podman-container-tools/podman#29031 (comment)

Affected Docker Images

docker.io/serversideup/php-dev:645-frankenphp-alpine
docker.io/serversideup/php:8.3-frankenphp

and perhaps all other images with CADDY_ADMIN=off env var?

Anything else?

Issue is not with podman/podman-compose. This issue is most likely due to a build step setting CADDY_ADMIN=off which is not handled properly to turn off caddy admin. Manually uncommenting admin off will fix this issue since admin off is handled properly if through a caddyfile. Also passing the env var CADDY_ADMIN= before running podman compose fixes this as well.

Look at https://github.com/caddyserver/caddy/blob/master/admin.go look for more info on how CADDY_ADMIN env var is handled.

Metadata

Metadata

Assignees

Labels

🧐 Bug: Needs ConfirmationSomething isn't working, but needs to be confirmed by a team member.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions