fix(docker): openssh s6 supervisor crash loop in new builds #372

Closed
opened 2026-05-31 17:03:20 +00:00 by jmiller · 0 comments
Owner

Problem

New Docker images built from Dockerfile crash loop due to openssh s6 supervisor failing with exit code 256. The s6-openssh-noop volume mount at /etc/s6/openssh/run is not preventing the crash.

Current workaround

Production runs on an older image (gc7cfcf894b) where this didn't occur.

Root cause

The s6 supervisor restarts openssh infinitely when it fails to bind port 22 (rootless UID 1000 cannot bind privileged ports). The noop script should prevent this but the new image may have a different s6 init sequence that runs before the volume mount takes effect.

Proposed fixes

  1. Add START_SSH_SERVER=false to environment (may not be respected by s6)
  2. Remove openssh package from the Dockerfile entirely for our use case
  3. Use Dockerfile.rootless with adjusted volume paths in compose
  4. Add RUN chmod +x /etc/s6/openssh/run && echo "exec sleep infinity" > /etc/s6/openssh/run to Dockerfile

Claude Opus 4.6 (1M context) noreply@anthropic.com

## Problem New Docker images built from `Dockerfile` crash loop due to openssh s6 supervisor failing with exit code 256. The `s6-openssh-noop` volume mount at `/etc/s6/openssh/run` is not preventing the crash. ## Current workaround Production runs on an older image (`gc7cfcf894b`) where this didn't occur. ## Root cause The s6 supervisor restarts openssh infinitely when it fails to bind port 22 (rootless UID 1000 cannot bind privileged ports). The noop script should prevent this but the new image may have a different s6 init sequence that runs before the volume mount takes effect. ## Proposed fixes 1. Add `START_SSH_SERVER=false` to environment (may not be respected by s6) 2. Remove openssh package from the Dockerfile entirely for our use case 3. Use `Dockerfile.rootless` with adjusted volume paths in compose 4. Add `RUN chmod +x /etc/s6/openssh/run && echo "exec sleep infinity" > /etc/s6/openssh/run` to Dockerfile --- *Claude Opus 4.6 (1M context) <noreply@anthropic.com>*
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#372