Skip to content

Admin and dashboard containers crash-loop after their first restart #1399

Description

@marcelo-maciel

The admin and dashboard containers crash-loop forever after their first restart.

Both clients/admin/docker/docker-entrypoint.sh and clients/dashboard/docker/docker-entrypoint.sh run under set -e, render /usr/share/nginx/html/config.json from /usr/share/nginx/html/config.json.template with envsubst, and then rm the template so it is not served. A container's writable layer survives docker restart, a Docker daemon restart and a host reboot under restart: unless-stopped, so the next start of the same container finds no template. The input redirect fails, set -e exits 1, and the container never comes back.

Repro

docker build -t fsh-dashboard clients/dashboard
docker run -d --name d -e FSH_API_URL=http://api.example fsh-dashboard   # running
docker restart d                                                        # exited, code 1
docker logs d
# /docker-entrypoint.sh: line 9: can't open /usr/share/nginx/html/config.json.template: no such file

The admin image fails the same way, at line 14. A compose stack built from these images sat in this loop with more than 2,000 restarts per container before anyone noticed, because restart: unless-stopped keeps retrying without surfacing anything.

Workaround

Recreate the containers (docker compose up -d --force-recreate admin dashboard). A fresh container gets the template back, but only until its next restart.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions