Docker with AI
Build, debug, and harden Docker with AI — Dockerfiles, image builds, registries, networking, volumes, the daemon, and container runtime errors.
24 copy-paste prompts · 140 in-depth guides Jump to prompts Jump to guides
Prompts
- Intermediate
Base Image Selection & Digest Pinning Prompt
Choose the right base image family (distroless, alpine, slim, full) for a workload and design a digest-pinning and update strategy that balances size, security, compatibility, and reproducibility.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Docker Build Context Reduction & .dockerignore Audit Prompt
Audit a bloated Docker build context, identify what is being uploaded to the daemon unnecessarily, and produce a tuned .dockerignore plus COPY strategy that shrinks context and speeds builds.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
BuildKit Cache Mount Strategy Design Prompt
Design a BuildKit cache-mount and cache-export strategy that speeds up dependency installs and compilation across local and CI builds without shipping cache into the final image.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Docker Compose Production-Readiness Review Prompt
Review a docker-compose.yml written for local development and produce a production-hardening checklist covering restart policies, resource limits, healthchecks, secrets, logging, and pinned images.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Container Network Performance Tuning Prompt
Diagnose and tune container networking throughput and latency, weighing bridge vs host vs overlay drivers, MTU mismatches, DNS resolution overhead, and userland-proxy costs on a Docker host.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Container Restart Policy Strategy Design Prompt
Design restart-policy strategy for containers across dev, CI, and production, choosing between no/on-failure/always/unless-stopped, tuning backoff, and pairing policies with healthchecks so crashes stay visible.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Container Startup Latency Optimization Prompt
Diagnose why a container takes too long from start to ready, separating image pull, entrypoint init, dependency waits, and app boot, then produce a ranked plan to cut cold-start time.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Multi-Container Log Aggregation Design Prompt
Design a log aggregation approach for a multi-container host or Compose stack, choosing logging drivers, structured formats, and a shipping path to a central store while preventing disk exhaustion.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Rootless & Non-Root Container User Hardening Prompt
Design a hardening plan that runs containers as a non-root user and, where appropriate, rootless Docker, covering USER directives, file ownership, capability dropping, and filesystem permissions without breaking the app.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Graceful Shutdown & Signal Handling Design Prompt
Design correct PID 1 signal handling so containers catch SIGTERM, drain in-flight work, and exit cleanly within the stop grace period instead of being SIGKILLed.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Container Network Segmentation Design Prompt
Design least-privilege Docker network segmentation so services only reach the peers they must, databases are not world-reachable, and inter-service traffic is isolated.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Registry Pull-Through Cache Design Prompt
Design a pull-through cache / registry mirror so hosts stop hitting Docker Hub rate limits, pulls get faster, and images survive upstream outages.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Container CPU & Memory Limit Right-Sizing Prompt
Right-size Docker CPU and memory limits/reservations from observed usage so containers stop getting OOM-killed or CPU-throttled without wasting capacity.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Logging Driver & Log-Rotation Design Prompt
Design a Docker logging strategy: pick the right log driver, enforce json-file rotation so logs never fill the disk, and ship container logs to a central aggregator.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Secrets Injection & Leak-Proofing Prompt
Move secrets out of Dockerfiles, images, and env vars into runtime injection (build secrets, Docker/Swarm secrets, mounted files) and audit for baked-in credentials.
- Claude
- ChatGPT
- Cursor
Open prompt - Beginner
Docker Build Failure Diagnosis Prompt
Diagnose a failing `docker build` from the error output and Dockerfile, pinpoint the breaking instruction (cache, COPY path, network, platform, dependency), and give a tested fix.
- Claude
- ChatGPT
Open prompt - Advanced
Multi-Arch Image Build with Buildx Design Prompt
Design a buildx multi-arch (amd64/arm64) image pipeline with the right builder, cross-compilation strategy, cache export, and a single multi-platform manifest pushed to a registry.
- Claude
- ChatGPT
Open prompt - Intermediate
Docker Compose Networking & Service Discovery Debug Prompt
Troubleshoot Compose services that cannot reach each other, fail DNS resolution, hit port conflicts, or start before dependencies are ready, and produce a corrected compose file.
- Claude
- ChatGPT
Open prompt - Intermediate
Crashing Container Exit-Code & Log Debug Prompt
Diagnose why a container exits immediately, restart-loops, or gets OOM-killed by reading its exit code, logs, and inspect output, then produce a ranked fix list.
- Claude
- ChatGPT
Open prompt - Intermediate
Container Healthcheck & ENTRYPOINT/CMD Design Prompt
Design a correct HEALTHCHECK and fix ENTRYPOINT/CMD so the container starts as PID 1, handles signals, reports real readiness, and shuts down gracefully.
- Claude
- ChatGPT
Open prompt - Advanced
Container Image Security & CVE Triage Prompt
Review a built image and scanner report to triage CVEs, harden the Dockerfile, drop the attack surface, and decide what to fix now versus accept with justification.
- Claude
- ChatGPT
Open prompt - Intermediate
Image Size Reduction Layer Audit Prompt
Audit an oversized image layer-by-layer to find what is taking space (caches, secrets, build artifacts, fat base) and produce concrete instructions to shrink it.
- Claude
- ChatGPT
- Dive
Open prompt - Intermediate
Volume Mount & Permission Troubleshooting Prompt
Fix Docker volume problems: permission-denied on bind mounts, UID/GID mismatch between host and container, data not persisting, or a named volume masking image content.
- Claude
- ChatGPT
Open prompt - Intermediate
Multi-Stage Dockerfile Size & Build-Cache Optimization Prompt
Refactor a bloated Dockerfile into a lean multi-stage build that maximizes layer cache hits, shrinks the final image, and speeds up CI rebuilds without breaking the runtime.
- Claude
- ChatGPT
Open prompt
Guides
- · 8 min read
Docker Containerization Explained: What It Is and Why It Makes Systems More Reliable
A grounded, production-minded guide to Docker containerization — what it is, how it differs from VMs, and why it makes systems more reliable and repeatable.
Read guide - · 9 min read
Docker Error Guide: 'context deadline exceeded' — Fix Registry & Daemon Timeouts
Fix 'context deadline exceeded' in Docker: diagnose slow registry pulls, proxy and DNS delays, an overloaded daemon, and stalled builds, then tune timeouts and connectivity.
Read guide - · 8 min read
Docker Error Guide: 'ports are not available: exposing port' — Fix Port Binding
Fix Docker 'ports are not available: exposing port TCP': release ports held by the OS, reserved dynamic-port ranges, host firewalls, and Desktop networking so container port publishing succeeds.
Read guide - · 12 min read
Docker Interview Questions and Answers (2026): 15 to Practice
15 common Docker interview questions and answers for DevOps, cloud, and SRE roles — with model answers covering containers, Dockerfiles, networking, Compose, security, and troubleshooting.
Read guide - · 10 min read
Docker vs Podman for Production: A Practical Comparison
A practical comparison of Docker and Podman for production — daemon vs daemonless, rootless security, systemd and quadlets, Compose vs pods, OCI, and migration.
Read guide - · 9 min read
Docker Error Guide: 'failed to solve: rpc error code = Unknown' BuildKit Failure
Fix Docker BuildKit 'failed to solve: rpc error: code = Unknown desc' build failures: diagnose the frontend/gRPC error, read the real cause, and rebuild cleanly with buildx.
Read guide - · 9 min read
Docker Error Guide: 'the buildx builder container is not running' BuildKit Failure
Fix Docker Buildx's 'buildkit ... the buildx builder container is not running' error: diagnose stopped builder containers, restart the builder, or recreate the buildx instance.
Read guide - · 9 min read
Docker Error Guide: 'no builder instance found' docker buildx Failure
Fix Docker's 'ERROR: no builder instance found' from docker buildx: create and select a builder with docker buildx create --use and confirm the driver is running.
Read guide - · 9 min read
Docker Error Guide: 'Cannot connect to the Docker daemon at tcp://host:2375' Remote Failure
Fix Docker 'Cannot connect to the Docker daemon at tcp://host:2375' errors: check DOCKER_HOST, the daemon TCP listener, firewall reachability, and TLS on 2376 versus plain 2375.
Read guide - · 9 min read
Docker Error Guide: 'controller not available' cgroup v2 Resource Limits
Fix Docker's 'failed to write ... cgroup ... controller not available' error on cgroup v2 hosts: enable delegated cpu/memory controllers under systemd and set limits.
Read guide - · 9 min read
Docker Error Guide: 'depends_on condition is not supported' Compose Failure
Fix Docker Compose 'service depends_on ... condition ... is not supported' error: enable the long depends_on syntax, use condition service_healthy, and pick a compatible Compose version.
Read guide - · 9 min read
Docker Error Guide: 'env file not found' in Docker Compose
Fix Docker Compose's 'env file .env not found' / 'Couldn't find env file' error: diagnose missing or mispathed .env files, env_file: paths, and --env-file overrides.
Read guide - · 9 min read
Docker Error Guide: 'context not found' from docker context use
Fix Docker's 'context not found: ... context does not exist' error from docker context use or --context: list, create, and repair broken or missing Docker contexts.
Read guide - · 9 min read
Docker Error Guide: 'no such file or directory' docker cp Copy Failure
Fix 'docker cp' errors like 'no such file or directory' and 'Could not find the file <path> in container': diagnose wrong source paths, stopped containers, and bad copy direction.
Read guide - · 9 min read
Docker Error Guide: 'devmapper: Thin Pool has free data blocks less than minimum required'
Fix Docker's 'devmapper: Thin Pool has <N> free data blocks which is less than minimum required' error: reclaim, extend the thin pool, or migrate off devicemapper.
Read guide - · 9 min read
Docker Error Guide: 'failed to create service' docker stack deploy Failure
Fix 'docker stack deploy' errors like 'failed to create service', 'network not found', and 'this node is not a swarm manager': diagnose swarm state, networks, and stack references.
Read guide - · 9 min read
Docker Error Guide: 'failed to export image' buildx Export and Push Failure
Fix Docker buildx 'failed to solve: failed to export image' errors: diagnose registry auth, cache export, --output, and --push problems and get builds exporting cleanly.
Read guide - · 9 min read
Docker Error Guide: 'hcsshim::CreateComputeSystem failed' Windows Container Failure
Fix Docker's Windows 'hcsshim::CreateComputeSystem ... failed' error: diagnose host/container OS build mismatches and pick the right process or hyperv isolation mode.
Read guide - · 9 min read
Docker Error Guide: 'http: server gave HTTP response to HTTPS client' Registry Pull/Push Failure
Fix Docker's 'http: server gave HTTP response to HTTPS client' error when pulling or pushing to a private registry: configure insecure-registries in daemon.json and restart Docker.
Read guide - · 9 min read
Docker Error Guide: 'unknown log opt' for the configured log driver
Fix Docker's 'unknown log opt <opt> for <driver> log driver' error: match --log-opt keys to the selected --log-driver and use options the driver supports.
Read guide - · 9 min read
Docker Error Guide: 'ApplyLayer lchown operation not permitted' Image Extract Failure
Fix Docker 'failed to register layer: ApplyLayer ... lchown ... operation not permitted' errors: resolve rootless/userns UID mapping, restrictive filesystem, and storage-driver problems.
Read guide - · 9 min read
Docker Error Guide: 'nvidia-container-cli: initialization error' on --gpus all
Fix Docker's 'nvidia-container-cli: initialization error' when running --gpus all: repair the NVIDIA driver / Container Toolkit mismatch and the runtime hook.
Read guide - · 9 min read
Docker Error Guide: 'This node is not a swarm manager' creating an overlay network
Fix Docker's 'cannot create overlay network ... requires swarm mode' / 'This node is not a swarm manager' error: init swarm or use an attachable overlay correctly.
Read guide - · 9 min read
Docker Error Guide: 'unauthorized: authentication required' Registry Token Failure
Fix Docker 'unauthorized: authentication required' errors pulling or pushing to a private registry: re-authenticate, fix token scope and endpoint, and repair credential-helper config.
Read guide - · 9 min read
Docker Error Guide: 'newuidmap: write to uid_map failed' Rootless Setup
Fix rootless Docker's 'newuidmap: write to uid_map failed: Operation not permitted' error: repair /etc/subuid, /etc/subgid, and the setuid bit on newuidmap/newgidmap.
Read guide - · 9 min read
Docker Error Guide: 'secret not found' on stack deploy and service create
Fix Docker's 'secret not found: <name>' error on docker stack deploy / service create: create the swarm secret, match the name, and target the manager node.
Read guide - · 9 min read
Docker Error Guide: 'no suitable node (scheduling constraints not satisfiable)' Swarm Service Stuck
Fix Docker Swarm's 'no suitable node (scheduling constraints not satisfiable)' error: diagnose placement constraints, missing node labels, and unavailable CPU/memory resources.
Read guide - · 9 min read
Docker Error Guide: 'the input device is not a TTY' in CI and Scripts
Fix Docker's 'the input device is not a TTY' error from docker run/exec -it in CI or non-interactive shells: drop the -t flag and run containers cleanly in pipelines.
Read guide - · 9 min read
Docker Error Guide: 'This node is not a swarm manager' service Commands
Fix Docker's 'This node is not a swarm manager' error from docker service, stack, or node: initialize the swarm with docker swarm init or join as a manager.
Read guide - · 9 min read
Docker Error Guide: 'userns-remap' subuid/subgid and Bind-Mount Permission Failure
Fix Docker userns-remap errors: diagnose missing subuid/subgid ranges, daemon startup failures, and 'permission denied' on bind mounts after enabling user-namespace remapping.
Read guide - · 8 min read
Docker Error Guide: 'blob upload unknown' — Fix Failed Image Pushes
Fix Docker 'blob upload unknown' on push: resolve interrupted chunked uploads, load balancer session affinity, proxy body limits, and registry storage issues so docker push completes.
Read guide - · 9 min read
Docker Error Guide: 'cannot allocate memory' — Fix Container Memory Failures
Fix Docker 'cannot allocate memory': diagnose host RAM/swap pressure, cgroup memory limits, overcommit settings, and PID/fork limits, then right-size limits so containers start and run reliably.
Read guide - · 9 min read
Docker Error Guide: 'Cannot kill container: did not receive an exit event' — Recover a Stuck Container
Fix Docker 'Cannot kill container: did not receive an exit event' caused by dockerd/containerd desync or a D-state process. Diagnose with ps state and restart containerd.
Read guide - · 9 min read
Docker Error Guide: 'cgroups: cgroup mountpoint does not exist' — Align the cgroup Driver
Fix Docker's OCI 'cgroup mountpoint does not exist' error: reconcile the cgroup v2 systemd-vs-cgroupfs driver mismatch by setting native.cgroupdriver=systemd in daemon.json and restarting.
Read guide - · 9 min read
Docker Error Guide: 'could not select device driver with capabilities [[gpu]]' — Enable NVIDIA GPUs
Fix Docker's 'could not select device driver [[gpu]]' error: install and register the NVIDIA Container Toolkit, configure the runtime in daemon.json, and run containers with --gpus all.
Read guide - · 8 min read
Docker Error Guide: 'daemon.json: invalid character looking for beginning of object key string' — Fix the JSON
Fix Docker's daemon.json 'invalid character' startup error: locate the trailing comma or stray brace, validate with jq or python, read journalctl, and restart the daemon cleanly.
Read guide - · 9 min read
Docker Error Guide: 'error mounting to rootfs' — Fix Container Mount Setup
Fix Docker 'error mounting to rootfs': resolve missing bind sources, file-vs-directory mismatches, SELinux labels, and read-only paths so the OCI runtime can set up container mounts and start.
Read guide - · 8 min read
Docker Error Guide: 'error pulling image configuration: download failed' — Fix Pulls
Fix Docker 'error pulling image configuration: download failed': repair blocked config-blob downloads from proxies, TLS interception, DNS, rate limits, and CDN issues so image pulls complete.
Read guide - · 9 min read
Docker Error Guide: 'image does not match the specified platform' — Pull the Right Architecture
Fix Docker 'image does not match the specified platform: wanted linux/amd64, actual linux/arm64' by pulling with --platform, using a multi-arch manifest, or building for the target arch.
Read guide - · 8 min read
Docker Error Guide: 'invalid volume specification' — Fix Mount Syntax
Fix Docker 'invalid volume specification': correct -v/--mount syntax, Windows path colons, missing container paths, relative sources, and named-volume vs bind-mount confusion so mounts attach.
Read guide - · 9 min read
Docker Error Guide: 'error while creating mount source path: operation not permitted' — Share the Path or Fix Ownership
Fix Docker 'error while creating mount source path: operation not permitted' by sharing the path in Docker Desktop File Sharing or fixing Linux host permissions and SELinux.
Read guide - · 9 min read
Docker Error Guide: 'no space left on device' with Free Bytes — Fix Inode Exhaustion
Fix Docker 'no space left on device' when df -h shows free space but df -i shows 100% IUse: inode exhaustion. Prune layers, and reformat with a higher inode ratio.
Read guide - · 8 min read
Docker Error Guide: 'OCI runtime exec failed: read-only file system' — Add Writable Paths
Fix Docker's OCI runtime 'read-only file system' error from --read-only containers: identify which paths the process writes to and mount tmpfs or writable volumes for exactly those.
Read guide - · 9 min read
Docker Error Guide: 'overlay2 failed to remove root filesystem: device or resource busy' — Clear Leaked Mounts
Fix Docker's overlay2 'device or resource busy' removal error: find the process or leaked mount holding the merged dir, unmount it, force-remove the container, and stop it recurring.
Read guide - · 9 min read
Docker Error Guide: 'overlay2/<hash>-init: no such file or directory' — Repair Corrupted Layer State
Fix Docker 'open /var/lib/docker/overlay2/<hash>-init: no such file or directory' from corrupted overlay2 state or an interrupted pull. Remove and re-pull the image, then prune.
Read guide - · 9 min read
Docker Error Guide: 'did not complete successfully: exit code' — Fix RUN Build Failures
Fix Docker 'process did not complete successfully: exit code' in BuildKit: read the failing RUN step, reproduce it interactively, fix missing deps and network, and get builds passing again.
Read guide - · 9 min read
Docker Error Guide: 'lookup <registry> on 127.0.0.11:53: no such host' — Fix Docker DNS
Resolve Docker's 'no such host' registry error: understand the 127.0.0.11 embedded DNS resolver, fix registry typos, configure daemon.json dns settings, and handle corporate DNS.
Read guide - · 9 min read
Docker Error Guide: 'requested image's platform does not match host' — Run Native or Emulate
Fix Docker's platform mismatch warning: understand QEMU emulation slowdowns, pin --platform, build multi-arch images with buildx, and pick base images that match your host.
Read guide - · 9 min read
Docker Error Guide: 'pthread_create failed: Operation not permitted' — Fix seccomp Syscall Blocks
Fix Docker 'pthread_create failed: Operation not permitted' and runc EPERM caused by an old seccomp profile blocking clone3. Update Docker/runc or loosen the seccomp profile.
Read guide - · 8 min read
Docker Error Guide: 'unexpected EOF' on Image Pull — Fix Broken Layer Downloads
Fix Docker 'unexpected EOF' during pull: repair truncated layer downloads from network drops, proxy/MTU issues, registry timeouts, and corrupt cache, then pull large images reliably.
Read guide - · 8 min read
Docker Error Guide: 'unsupported media type' — Fix Registry Manifest Pulls
Fix Docker 'unsupported media type': resolve OCI vs Docker manifest mismatches, old daemons rejecting new formats, non-registry endpoints, and proxy rewrites so pulls and pushes work.
Read guide - · 9 min read
Docker Error Guide: 'error initializing graphdriver' — Fix Storage Driver Startup
Fix Docker 'error initializing graphdriver': the daemon won't start because of a mismatched or unsupported storage driver, a dirty data root, or a bad backing filesystem.
Read guide - · 9 min read
Docker Error Guide: 'no basic auth credentials' — Fix Registry Push/Pull Auth
Fix 'no basic auth credentials' in Docker: log in to the right registry, match the image name to your login host, refresh expired tokens, and repair the credential store.
Read guide - · 8 min read
Docker Error Guide: 'No command specified' — Fix Missing CMD/ENTRYPOINT
Fix Docker 'No command specified': give the image a CMD or ENTRYPOINT, pass a command to docker run, restore an overridden entrypoint, or fix a wiped base image.
Read guide - · 9 min read
Docker Error Guide: 'cannot find cgroup mount destination: unknown' — Fix cgroup Mounts
Fix 'cannot find cgroup mount destination: unknown' in Docker: mount the cgroup hierarchy, resolve cgroup v1/v2 mismatches inside privileged and DinD containers, and restart the daemon.
Read guide - · 9 min read
Docker Error Guide: 'too many open files' — Fix File Descriptor Limits
Fix 'too many open files' in Docker: raise nofile ulimits for the daemon and containers, lift the inotify watch ceiling, and stop descriptor leaks that crash busy containers.
Read guide - · 9 min read
Docker Error Guide: 'bind: address already in use' — Port Conflict on Container Start
Fix 'bind: address already in use' in Docker: find the process or container holding the host port, free it or remap the published port, then restart.
Read guide - · 9 min read
Docker Error Guide: 'cannot create directory: Permission denied' — Volume & Bind-Mount Ownership
Fix Docker's 'cannot create directory: Permission denied' on volumes and bind mounts caused by UID/GID mismatches between the container user and host directory ownership.
Read guide - · 8 min read
Docker Error Guide: 'Cannot kill container: is not running' — Already-Stopped Container
Fix 'Cannot kill container: Container is not running': the target already exited. Learn to check state with docker ps, use rm/start correctly, and script idempotent stops.
Read guide - · 8 min read
Docker Error Guide: 'cannot stop container: permission denied' — Fix Daemon and Cgroup Signal Failures
Fix Docker 'cannot stop container permission denied': diagnose docker socket access, rootless and SELinux/AppArmor policies, stuck cgroups, and kill signals the runtime cannot deliver.
Read guide - · 8 min read
Docker Error Guide: 'Additional property is not allowed' — Invalid Compose Key
Fix Compose's 'services.<svc> Additional property <key> is not allowed': a misspelled, misindented, or unsupported key failing schema validation. Learn to spot and fix it.
Read guide - · 9 min read
Docker Error Guide: 'docker-compose: command not found' — Compose v1 vs the v2 Plugin
Fix 'docker-compose: command not found' by understanding Compose v1 (docker-compose) vs the v2 plugin (docker compose), installing the plugin, and fixing your PATH.
Read guide - · 9 min read
Docker Error Guide: 'Error while fetching server API version' — Daemon Not Reachable
Fix Compose's 'Error while fetching server API version: Connection aborted, FileNotFoundError' by starting the Docker daemon, fixing the socket path, and DOCKER_HOST.
Read guide - · 8 min read
Docker Error Guide: 'Network declared as external, but could not be found' — Compose
Fix 'Network declared as external, but could not be found' in Compose: create the external network first, match the real name, or drop the external flag to auto-create it.
Read guide - · 8 min read
Docker Error Guide: 'depends_on undefined service' — Invalid Compose Project
Fix 'service depends on undefined service: invalid compose project' by matching depends_on entries to real service keys, fixing typos, and merging override files.
Read guide - · 8 min read
Docker Error Guide: 'Version is unsupported' — The Obsolete Compose version Key
Fix 'Version in docker-compose.yml is unsupported': the top-level version key is obsolete in Compose v2. Remove it, or upgrade Compose to match your file schema.
Read guide - · 9 min read
Docker Error Guide: 'Connection refused' — Container Can't Reach the Host
Fix a Docker container that can't reach host or peer services: use host.docker.internal with host-gateway, pick bridge vs host networking, publish ports, and open the firewall.
Read guide - · 8 min read
Docker Error Guide: 'Container is not running' — Why exec and Restart Fail
Fix Docker 'Container is not running': find why the container exited, read logs and exit codes, inspect the entrypoint, and keep long-running processes alive in the foreground.
Read guide - · 8 min read
Docker Error Guide: 'Container is restarting, wait until the container is running' — Fix Crash Loops
Fix Docker 'container is restarting, wait until the container is running': diagnose crash loops from restart policies, read logs and exit codes, and stop the restart cycle safely.
Read guide - · 8 min read
Docker Error Guide: 'container name is already in use' — Fix Naming Conflicts on docker run
Fix 'Conflict. The container name is already in use' in Docker: remove or rename the existing container, use --rm, and stop leftover containers from prior runs.
Read guide - · 8 min read
Docker Error Guide: 'Cannot connect to the Docker daemon' — Wrong Context Endpoint
Fix 'Cannot connect to the Docker daemon' caused by an active Docker context or DOCKER_HOST pointing at an unreachable endpoint: list, inspect, recreate, and switch back to default.
Read guide - · 9 min read
Docker Error Guide: 'could not find an available, non-overlapping IPv4 address pool' — Exhausted Subnets
Fix 'could not find an available, non-overlapping IPv4 address pool' in Docker: prune leftover networks, widen default-address-pools, free subnets.
Read guide - · 8 min read
Docker Error Guide: 'denied: requested access to the resource is denied' — Fix docker push Auth
Fix Docker push 'denied: requested access to the resource is denied': log in to the right registry, tag with the correct namespace, and grant push scope for your repository.
Read guide - · 9 min read
Docker Error Guide: 'dial unix /var/run/docker.sock: connect: connection refused'
Fix 'dial unix /var/run/docker.sock: connect: connection refused': the Docker daemon is down or the socket is stale. Start dockerd, check the socket, and fix permissions.
Read guide - · 8 min read
Docker Error Guide: 'the Dockerfile (Dockerfile) cannot be empty' — Fix Blank or Truncated Dockerfiles
Fix 'the Dockerfile (Dockerfile) cannot be empty' in Docker: restore truncated files, fix zero-byte writes, comment-only files, and wrong -f targets.
Read guide - · 8 min read
Docker Error Guide: 'Dockerfile parse error: unknown instruction' — Fix Invalid Dockerfile Syntax
Fix 'Dockerfile parse error line n: unknown instruction' in Docker: catch typos, stray text, wrong casing, missing line continuations, and non-Dockerfile content.
Read guide - · 9 min read
Docker Error Guide: 'driver failed programming external connectivity' — Port Publish Fails
Fix 'driver failed programming external connectivity on endpoint': a port already in use, a stale iptables rule, or a dead daemon. Free the port or restart Docker to recover.
Read guide - · 9 min read
Docker Error Guide: 'error creating overlay mount ... no such file or directory' — overlay2 Corruption
Fix Docker's 'error creating overlay mount to /var/lib/docker/overlay2/<id>/merged: no such file or directory' caused by missing or corrupted overlay2 layer directories.
Read guide - · 9 min read
Docker Error Guide: 'error getting credentials - err: exit status 1' — Fix Credential Helpers
Fix Docker 'error getting credentials err exit status 1 out': repair a broken credsStore helper, install docker-credential binaries, and clear corrupt entries in config.json.
Read guide - · 9 min read
Docker Error Guide: 'failed to compute cache key: not found' — Fix Missing COPY/ADD Source Paths
Fix 'failed to compute cache key: path not found' in Docker: resolve COPY/ADD sources missing from the build context, .dockerignore exclusions, and wrong paths.
Read guide - · 9 min read
Docker Error Guide: 'failed to create endpoint on network bridge: address already in use' — Port/IP Clash
Fix 'failed to create endpoint on network bridge: address already in use': free the clashing host port or static IP, clear stale endpoints, restart.
Read guide - · 8 min read
Docker Error Guide: 'failed to mount local volume: no such file or directory' — Missing Bind Source
Fix Docker's 'failed to mount local volume: mount /<path>: no such file or directory' error caused by missing bind-mount source paths or bad volume device options.
Read guide - · 8 min read
Docker Error Guide: 'failed to read dockerfile: no such file or directory' — Fix Missing Dockerfile Path
Fix 'failed to read dockerfile: open /Dockerfile: no such file or directory' in Docker: point -f at the right file, fix the build context, and check casing.
Read guide - · 9 min read
Docker Error Guide: 'Forbidden path outside the build context' — COPY/ADD Beyond the Context
Fix 'Forbidden path outside the build context' in Docker: keep COPY/ADD sources inside the context root, restructure it, or use multi-stage builds.
Read guide - · 9 min read
Docker Error Guide: 'health: starting → unhealthy' — Fix a Failing HEALTHCHECK
Fix a Docker container stuck (unhealthy): read State.Health, run the HEALTHCHECK manually, and tune interval, timeout, retries, and start-period so healthy containers pass.
Read guide - · 8 min read
Docker Error Guide: 'image is being used by running container' — Cannot Delete Image
Fix 'conflict: unable to delete image - image is being used by running container': stop and remove the dependent containers first, then remove the image or re-tag safely.
Read guide - · 9 min read
Docker Error Guide: 'image operating system "linux" cannot be used on this platform' — OS/Arch Mismatch
Fix Docker's 'image operating system "linux" cannot be used on this platform' error caused by OS or CPU architecture mismatches between an image and your host.
Read guide - · 9 min read
Docker Error Guide: 'input/output error' on /var/lib/docker/overlay2 — Filesystem Corruption
Fix Docker's 'input/output error' reading /var/lib/docker/overlay2, caused by underlying disk or filesystem corruption, and recover the data root safely.
Read guide - · 8 min read
Docker Error Guide: 'invalid reference format' — Malformed Image Name or Tag
Fix 'invalid reference format' in Docker: correct malformed image names, uppercase repos, bad tags, stray spaces, and misquoted run arguments.
Read guide - · 9 min read
Docker Error Guide: 'iptables: No chain/target/match by that name' — Broken Firewall Chains
Fix 'iptables: No chain/target/match by that name' in Docker: restore the DOCKER chains a firewall flush removed by restarting the daemon cleanly.
Read guide - · 8 min read
Docker Error Guide: 'mkdir: read-only file system' — Fix Read-Only Containers and Mounts
Fix Docker 'mkdir read-only file system': diagnose --read-only containers, read-only bind mounts, and writes to immutable image layers, then add writable volumes or tmpfs correctly.
Read guide - · 8 min read
Docker Error Guide: 'Mounts denied: The path is not shared from the host' — Desktop File Sharing
Fix Docker Desktop's 'Mounts denied: The path is not shared from the host and is not known to Docker' error by configuring file sharing for bind-mounted paths.
Read guide - · 8 min read
Docker Error Guide: 'name unknown: repository name not known to registry' — Wrong Repo Path
Fix Docker's 'name unknown: repository name not known to registry' error caused by wrong repository paths, missing namespaces, or repos that were never created.
Read guide - · 9 min read
Docker Error Guide: 'net/http: request canceled while waiting for connection' — Registry Timeouts
Fix Docker's 'net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)' caused by proxy, DNS, or registry timeouts.
Read guide - · 8 min read
Docker Error Guide: 'network has active endpoints' — Cannot Remove a Network In Use
Fix 'network has active endpoints' in Docker: find the containers still attached, disconnect or remove them, then delete the network cleanly.
Read guide - · 8 min read
Docker Error Guide: 'network <name> not found' — Missing or Stale Docker Network
Fix 'network not found' in Docker: recreate the missing network, repair stale Compose references, reconnect containers, and clean up dangling IDs.
Read guide - · 8 min read
Docker Error Guide: 'No such container' — Fix Missing Container References
Fix 'Error response from daemon: No such container' in Docker: check exact names and IDs, list all containers, and handle removed or auto-cleaned containers.
Read guide - · 8 min read
Docker Error Guide: 'No such image' — Fix Missing Image References and Tags
Fix 'Error response from daemon: No such image' in Docker: pull the image, match the exact tag, check the registry and local image list, and fix build tags.
Read guide - · 9 min read
Docker Error Guide: 'OCI runtime exec failed: permission denied' — Fix Non-Executable Entrypoints
Fix Docker 'OCI runtime exec failed permission denied': set the executable bit on entrypoints, handle CRLF and missing interpreters, and resolve noexec mounts and security policies.
Read guide - · 9 min read
Docker Error Guide: 'Pool overlaps with other one on this address space' — Subnet Collision
Fix 'Pool overlaps with other one on this address space' in Docker: find the colliding subnet, pick a non-overlapping CIDR, and reconfigure Compose.
Read guide - · 9 min read
Docker Error Guide: 'received unexpected HTTP status: 500 Internal Server Error' — Registry Failures
Fix Docker's 'received unexpected HTTP status: 500 Internal Server Error' during push or pull, caused by registry backend, storage, or proxy failures upstream.
Read guide - · 8 min read
Docker Error Guide: 'pull access denied, repository does not exist or may require docker login'
Fix Docker 'pull access denied, repository does not exist or may require docker login': correct the image name and registry, log in for private repos, and verify the tag exists.
Read guide - · 9 min read
Docker Error Guide: 'returned a non-zero code: 1' — Failing RUN Step in a Build
Fix 'returned a non-zero code: 1' in Docker: read the failing RUN command's real output, reproduce it interactively, and repair the package or script.
Read guide - · 9 min read
Docker Error Guide: 'standard_init_linux.go: exec format error' — Fix CPU Architecture Mismatch
Fix Docker 'standard_init_linux.go exec format error': diagnose arm64-vs-amd64 image mismatches, inspect image architecture, and build multi-arch images with buildx.
Read guide - · 8 min read
Docker Error Guide: 'target stage could not be found' — Fix Multi-Stage Build Target Names
Fix 'failed to solve: target stage could not be found' in Docker: match --target and COPY --from names to your Dockerfile's 'AS' stage names and check typos.
Read guide - · 8 min read
Docker Error Guide: 'unable to prepare context: path not found' — Fix Invalid Build Context Paths
Fix 'unable to prepare context: path not found' in Docker: point the build context at an existing directory, fix argument order, and check relative paths.
Read guide - · 8 min read
Docker Error Guide: 'unauthorized: authentication required' — Fix Docker Login and Tokens
Fix Docker 'unauthorized: authentication required': log in to the right registry, refresh expired tokens, handle rate limits, and configure non-interactive CI credentials correctly.
Read guide - · 8 min read
Docker Error Guide: 'volume is in use' — Cannot Remove a Volume Bound to a Container
Fix Docker's 'Error response from daemon: remove <vol>: volume is in use' by finding and removing the containers referencing the volume before deleting it safely.
Read guide - · 8 min read
Docker Error Guide: 'You cannot remove a running container' — Fix Container Removal Failures
Fix 'You cannot remove a running container' in Docker: stop the container first, use docker rm -f to force removal, and handle restart loops safely.
Read guide - · 8 min read
What Is a Docker Image? A Practical Mental Model for Developers
What is a Docker image? A clear, practical guide to image layers, the union filesystem, image vs. container, tags vs. digests, registries, and hygiene.
Read guide - · 9 min read
What Is Docker? A Plain, No-Hype Explanation for Engineers
What is Docker? A plain, no-hype guide for engineers — what it is, the "works on my machine" problem it solves, container vs VM, and the commands that matter.
Read guide - · 9 min read
Docker Error Guide: 'conflict: unable to remove repository reference' Image Removal Failures
Fix Docker 'conflict: unable to remove image': clear containers using the image, handle multiple tags and child images, and force-remove references safely.
Read guide - · 9 min read
Docker Error Guide: 'context canceled' Build and Pull Cancellation Failures
Fix Docker 'context canceled': diagnose timeouts, interrupted builds, daemon restarts, and dropped connections that abort BuildKit and pull operations.
Read guide - · 9 min read
Docker Error Guide: 'device or resource busy' Volume and Mount Removal Failures
Fix Docker 'device or resource busy' on volume rm: find containers still using the volume, clear stale mounts, and release busy bind targets safely.
Read guide - · 9 min read
Docker Error Guide: 'exec /entrypoint.sh: no such file or directory' Entrypoint Startup Failures
Fix Docker 'exec /entrypoint.sh: no such file or directory': repair CRLF line endings, missing shells, wrong arch, and unset executable bits on entrypoints.
Read guide - · 9 min read
Docker 'failed to create shim task': How to Fix the containerd Runtime Error
Fix Docker 'failed to create shim task': repair runc/containerd-shim issues, cgroup v2 misconfig, OCI runtime errors, and missing kernel features.
Read guide - · 9 min read
Docker 'failed to set up container networking': Fix the Bridge and IP Pool
Fix Docker 'failed to set up container networking': repair the docker0 bridge, exhausted IP pools, missing iptables/nftables rules, and stale network state.
Read guide - · 9 min read
Docker Error Guide: 'layers from manifest don't match image configuration' Pull Validation Failures
Fix Docker 'layers from manifest don't match image configuration': clear corrupted pull caches, registry mirror mismatches, and broken multi-arch manifests.
Read guide - · 9 min read
Docker Error Guide: 'max depth exceeded' Image Layer Limit Failures
Fix Docker 'max depth exceeded': flatten oversized layer stacks, refactor RUN-heavy Dockerfiles, and rebuild base images that exceed the 125-layer limit.
Read guide - · 9 min read
Docker Error Guide: 'toomanyrequests' Docker Hub Pull Rate Limit Failures
Fix Docker 'toomanyrequests' rate limit: authenticate pulls, use a pull-through mirror, pin digests, and stop anonymous Docker Hub throttling in CI.
Read guide - · 9 min read
Docker Error Guide: 'Cannot connect to the Docker daemon' Daemon Connection Failures
Fix 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock' by starting dockerd, fixing DOCKER_HOST, daemon.json, and the active context.
Read guide - · 9 min read
Docker Error Guide: 'client version is too new' API Version Mismatch
Fix Docker's client version too new error: pin DOCKER_API_VERSION, upgrade the daemon to match the CLI, or align engine and CLI versions in CI and remote hosts.
Read guide - · 9 min read
Docker Error Guide: 'COPY failed: file not found in build context' Build Context Errors
Fix 'COPY failed: file not found in build context' in Docker: correct context-relative paths, .dockerignore exclusions, wrong build context, case sensitivity, and COPY --from.
Read guide - · 9 min read
Docker Error Guide: 'Error initializing network controller' Daemon Startup Failure
Fix dockerd 'Error initializing network controller' bridge and NAT failures: repair iptables, firewalld, the docker0 bridge, ip_forward, and corrupt network state.
Read guide - · 9 min read
Docker Error: 'OCI runtime exec failed — executable file not found in $PATH'
Fix Docker's 'OCI runtime exec failed: unable to start container process: exec: executable file not found in $PATH' — install the binary, use an absolute path, or fix exec vs shell form.
Read guide - · 9 min read
Docker Error Guide: 'failed to mount overlay: invalid argument' overlay2 Storage Failures
Fix 'failed to mount overlay: invalid argument' in Docker: resolve missing d_type on xfs, unsupported kernels, symlink-depth limits, corrupted overlay2, and driver mismatches.
Read guide - · 9 min read
Docker Error Guide: 'failed to register layer' Storage and Layer Extraction Failures
Fix Docker 'failed to register layer': free disk space and inodes, prune overlay2, repair userns-remap chown errors, and re-pull corrupted layers. Diagnose with system df.
Read guide - · 9 min read
Docker Error Guide: 'failed to solve with frontend dockerfile.v0' BuildKit Build Failures
Fix 'failed to solve with frontend dockerfile.v0' in Docker BuildKit: resolve Dockerfile syntax errors, missing files, unresolved ARGs, base images, and cache key failures.
Read guide - · 9 min read
Docker Error Guide: 'invalid mount config for type "bind"' Bind Mount Failures
Fix Docker's invalid mount config for type bind error: create missing host paths, use absolute paths, enable Desktop file sharing, and set SELinux labels.
Read guide - · 9 min read
Docker Error Guide: 'manifest unknown' Missing Tag or Digest
Fix Docker 'manifest for <image>:<tag> not found: manifest unknown': use a tag that exists, push the missing tag, check digests, and inspect the registry with manifest inspect.
Read guide - · 9 min read
Docker Error Guide: 'no matching manifest for linux/amd64 in the manifest list entries' Platform Mismatch
Fix Docker 'no matching manifest for linux/amd64': pull with --platform, build multi-arch images with buildx, inspect available platforms, and enable qemu emulation.
Read guide - · 9 min read
Docker Error Guide: 'no space left on device' Docker Disk Exhaustion
Fix 'no space left on device' in Docker: reclaim disk from images, containers, volumes, and build cache, free inodes, rotate logs, and relocate or grow /var/lib/docker.
Read guide - · 9 min read
'OCI runtime create failed: runc create failed': How to Fix Docker Container Starts
Fix 'OCI runtime create failed: runc create failed' by reading the runc error suffix — missing binary, permission denied, no such file, or bad mount.
Read guide - · 9 min read
Docker Error Guide: 'OOMKilled' Exit Code 137 Out-of-Memory Container Kills
Fix Docker OOMKilled and exit code 137: raise memory limits, make the JVM and Node cgroup-aware, find leaks, and read dmesg to confirm the kernel OOM kill.
Read guide - · 9 min read
Docker Error Guide: 'permission denied while trying to connect to the Docker daemon socket' Access Errors
Fix 'Got permission denied' on /var/run/docker.sock by adding your user to the docker group, re-logging in, or switching to rootless Docker safely.
Read guide - · 9 min read
Docker Error Guide: 'port is already allocated' Container Port Bind Failures
Fix Docker 'port is already allocated' and 'address already in use' bind errors: free conflicting containers, host processes, stale docker-proxy, and remap ports.
Read guide - · 9 min read
Docker Error Guide: 'pull access denied for <image>, repository does not exist or may require docker login' Registry Auth Failures
Fix Docker 'pull access denied... requested access to the resource is denied': run docker login, correct the namespace, check ~/.docker/config.json, and verify the image exists.
Read guide - · 9 min read
Docker Error Guide: 'Temporary failure in name resolution' Container DNS Failures
Fix Docker 'Temporary failure in name resolution' and 127.0.0.11 DNS errors: repair host resolv.conf, set daemon DNS, use user-defined networks, and handle IPv6.
Read guide - · 9 min read
'net/http: TLS handshake timeout' in Docker: Causes & Fix
Fix Docker's 'net/http: TLS handshake timeout' on registry pulls: usually a broken dockerd proxy or wrong docker0 MTU. Diagnose and unblock with real commands.
Read guide - · 9 min read
Docker Error Guide: 'x509: certificate signed by unknown authority' Registry TLS Failures
Fix Docker's x509 certificate signed by unknown authority error: install the registry CA in /etc/docker/certs.d, update the trust store, and restart dockerd.
Read guide