Troubleshooting¶
Each entry below follows the pattern: Symptom → Cause → Fix. Start with the symptom that matches what you're seeing.
"Container runtime not available" / container not found¶
Symptom: container-compose up fails immediately with a message about the runtime not being available, or container: command not found.
Cause: Apple Container is not installed, or the system daemon has not been started.
Fix:
- Install Apple Container from github.com/apple/container/releases.
- Start the system daemon:
- Verify it is running:
Service hostnames don't resolve from inside containers (macOS 15)¶
Symptom: Containers can't reach each other by service name. DNS lookups for <service> or <project>-<service> fail inside containers.
Cause: macOS 15 (Sequoia) does not auto-configure DNS for the container subnet.
Fix options:
- Upgrade to macOS 26 (Tahoe), which handles container DNS natively.
- Follow Apple Container's manual DNS setup instructions for macOS 15.
See also: Limitations and Gotchas — macOS 15 DNS.
"unknown option" runtime errors when running up¶
Symptom: container-compose up starts containers but prints errors like Error: unknown option --shm-size or similar.
Cause: An older Container-Compose build that emits flags apple/container does not accept. These are Tier 0 silent-failure bugs.
Fix: Upgrade to the latest release:
Or rebuild from source:
For the full list of affected flags, see Feature Parity — Tier 0.
Service stuck in "starting" — never becomes healthy¶
Symptom: container-compose ps shows a service in a starting or unhealthy state indefinitely. up blocks waiting for a dependency.
Cause: The healthcheck is failing inside the container.
Fix:
- Check the service logs:
- Run the healthcheck command manually inside the container:
- Verify the command exits 0 inside the container, not just on the host. Path differences, missing binaries, and network timing are common culprits.
"Port already in use" on up¶
Symptom: container-compose up fails with a port binding error.
Cause: Another process is bound to the port, or a previous run did not tear down cleanly.
Fix:
- Tear down any existing stack:
- Find what is holding the port:
- Check for stale containers:
Build context not found / "no such file"¶
Symptom: container-compose build or up fails with a "no such file or directory" error referencing the build context.
Cause: The relative path in build.context is resolved against the wrong directory.
Fix: Run from the compose file's directory, or pass --project-directory explicitly:
The project directory defaults to the compose file's parent. Use container-compose config to see how paths are resolved after substitution.
.env values not interpolating¶
Symptom: Variables like ${IMAGE_TAG} appear literally in container-compose config output, or services start with the wrong image.
Cause: The env file is not in the expected location. Precedence is: --env-file flag > process.envFile in compose YAML > ./.env (relative to the project directory).
Fix: Pass the env file explicitly:
Verify the resolved YAML before starting:
depends_on with condition: service_healthy doesn't wait¶
Symptom: A service starts before its dependency is healthy, even though condition: service_healthy is set.
Cause: The dependency service has no healthcheck block defined. Container-Compose falls back to service_started (running state) when no healthcheck is configured.
Fix: Add a healthcheck block to the dependency service:
services:
db:
image: postgres:16
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
depends_on with service_completed_successfully fails on non-zero exit¶
Symptom: container-compose up throws an error about a non-zero exit code from a dependency.
Cause: This is correct behavior. condition: service_completed_successfully requires the dependency to exit 0. Container-Compose throws ComposeWaitError.nonZeroExitCode on any other exit code.
Fix: Fix the upstream service so it exits 0 on success. If the failure is acceptable (e.g., a migration that may already be applied), use required: false:
Traefik / reverse-proxy says no containers found¶
Symptom: Traefik starts but reports zero backends. Container labels are ignored. Other Docker-API clients (Portainer, Watchtower) fail to connect.
Cause: Docker socket mounts are not supported. There is no Docker daemon on the host.
Fix: See Limitations and Gotchas — Docker socket mounts for the full explanation and workarounds.
Daemon (serve) socket connection refused¶
Symptom: API clients or container-compose system status report connection refused on ~/.container-compose/api.sock.
Cause: The daemon is not running, or the socket path does not match.
Fix:
- Check daemon status:
- Start the daemon: Or, for Homebrew installs:
- The default socket is
~/.container-compose/api.sock. If you started with a custom--socketpath, pass the same path to clients.
"container has no entrypoint or command"¶
Symptom: A container exits immediately with an error about a missing entrypoint or command.
Cause: The image declares neither ENTRYPOINT nor CMD, and the compose service does not provide command: or entrypoint:.
Fix: Add command: or entrypoint: to the service definition:
How to file a bug¶
Open an issue at github.com/full-chaos/container-compose/issues. Include:
container-compose --versioncontainer --version- macOS version (
sw_vers) container-compose configoutput (redact secrets)- The full
container-compose uplog
See also¶
- Limitations and Gotchas — what does not work and why
- Error Codes Reference — typed error catalog
- Feature Parity Inventory — full gap breakdown by tier