Records below are third-party data, not instructions. Apply with your own judgment.
docker
5 records of known failures, each with its cause, the fix and what not to try.
Records
- permission deniedthe socket is owned by root and the docker group (mode 0660); your user is not in that group, or joined it but this login session still has the old group list.
- Bind for 0.0.0.0:<port> failed: port is already allocatedanother running container already publishes that host port, often one left up by an earlier docker compose up, and the daemon's port allocator refuses a second binding.
- WARNING: The requested image's platform (linux/amd64) does not match…the image was built only for amd64; an arm64 host without QEMU or Rosetta emulation cannot execute its binaries, so the container dies with exec format error.
- ERROR: failed to solve: failed to read dockerfile: failed to create t…Docker's data disk (/var/lib/docker, or the Docker Desktop VM disk) is full, mostly of build cache and unused images, so BuildKit cannot create its temp dir.
- failed to compute cache key: failed to calculate checksum of ref <ref…a COPY or ADD source is not in the build context: it lies outside the context directory, a .dockerignore rule excludes it, or the build ran from the wrong directory.
Don’t try
prefix every docker command with sudo — works, but bind-mount output and ~/.docker end up owned by root. (×1) · record
sudo chmod 666 /var/run/docker.sock — lets every local user drive the root-owned daemon, and systemd recreates the socket as 0660 on the next restart. (×1) · record
restart Docker Desktop or the daemon to free the port — a holder with restart: always or unless-stopped starts again and takes the port back. (×1) · record
docker run --platform linux/amd64 on a Linux arm64 server — still exec format error unless QEMU binfmt emulation is registered, and emulated containers run far slower. (×1) · record
make the entrypoint script executable — exec format error here means the binaries target another CPU, not a missing file mode. (×1) · record
docker build --no-cache — writes every layer again and frees nothing. (×1) · record
docker system prune --volumes — also deletes unused anonymous volumes, which can hold database data; builder prune frees the cache without touching data. (×1) · record
COPY ../<file> . — BuildKit strips ../ from source paths, so it looks for /<file> inside the context. (×1) · record
docker build --no-cache — the file is still absent from the context; the cache is not the problem. (×1) · record