Docker and registry
Encyclopedia home · Search machine-readable catalog
The broken snippets are deliberate negative examples. Use only in an isolated fixture repository or lab.
F073
COPY file outside build context
Symptom. failed to calculate checksum: not found.
Root cause. Dockerfile copies a root-level input absent from service context.
Broken example
docker build -f services/web/Dockerfile services/webCorrected example
docker build -f services/web/Dockerfile .Verification. Adjust COPY sources for chosen context and inspect .dockerignore.
Correction validation syntax-validated.
F074
Build excludes needful lockfile
Symptom. uv.lock not found in build context.
Root cause. A broad pattern hides required dependencies.
Broken example
*.lockCorrected example
*.lock
!uv.lockVerification. Inspect BuildKit logs and verify intended exception.
Correction validation untested.
F075
Smoke test tries service too early
Symptom. connection refused immediately after docker run.
Root cause. Process start is not readiness.
Broken example
curl -fsS http://localhost:18000/healthzCorrected example
curl -fsS --retry 8 --retry-connrefused --retry-delay 1 http://localhost:18000/healthzVerification. Poll readiness with a bounded retry policy.
Correction validation syntax-validated.
F076
Container listens on loopback internally
Symptom. host curl connection reset.
Root cause. Published Docker port cannot reach process bound to container loopback.
Broken example
uvicorn app:app --host 127.0.0.1 --port 8000Corrected example
uvicorn app:app --host 0.0.0.0 --port 8000Verification. Bind all interfaces in isolated container and publish loopback on host as needed.
Correction validation syntax-validated.
F077
Image name contains uppercase characters
Symptom. invalid reference format.
Root cause. Repository components must be lowercase.
Broken example
docker tag web:ci "ghcr.io/$OWNER/Web:ci"Corrected example
image_repo=$(printf 'ghcr.io/%s/web' "$OWNER" | tr '[:upper:]' '[:lower:]')
docker tag web:ci "$image_repo:ci"Verification. Validate final printed image reference.
Correction validation syntax-validated.
F078
Push targets missing local tag
Symptom. An image does not exist locally with the tag.
Root cause. Building one name doesn't create a second local reference.
Broken example
docker push "$IMAGE:sha-$GITHUB_SHA"Corrected example
docker tag web:ci "$IMAGE:sha-$GITHUB_SHA"
docker push "$IMAGE:sha-$GITHUB_SHA"Verification. Inspect exact manifest before push.
Correction validation syntax-validated.
F079
Buildx image inaccessible to docker run
Symptom. unable to find image locally.
Root cause. Container driver doesn't load result by default.
Broken example
docker buildx build -t web:ci .
docker run --rm web:ciCorrected example
docker buildx build --load --platform linux/amd64 -t web:ci .
docker run --rm web:ciVerification. Verify docker image inspect succeeds after single-platform load.
Correction validation syntax-validated.
F080
Registry certificate fails verification
Symptom. certificate signed by unknown authority.
Root cause. Private CA is missing from trusted clients.
Broken example
curl -k "https://$REGISTRY/v2/"Corrected example
curl --cacert ci/registry-ca.pem "https://$REGISTRY/v2/"Verification. Trust approved CA through Docker daemon config and confirm chain.
Correction validation syntax-validated.
F081
Wrong CPU image selected on runtime host
Symptom. no matching manifest or exec format error.
Root cause. Single image has incompatible architecture.
Broken example
docker run --rm "$IMAGE:arm64"Corrected example
docker buildx imagetools inspect "$IMAGE:multi"
docker run --rm "$IMAGE:multi"Verification. Check manifest list for target architecture.
Correction validation syntax-validated.
F082
Disk fills from unbounded images
Symptom. no space left on device.
Root cause. Per-run images were retained indefinitely.
Broken example
docker build -t "web:$RUN_ID" .Corrected example
docker system df
docker build -t "web:$RUN_ID" .
docker image rm "web:$RUN_ID"Verification. Use ephemeral runners or bounded cleanup after tests with no shared image deletion.
Correction validation syntax-validated.