All tags
Start here · containersStop Docker logs from filling your disk with log rotation9 steps · 8 min read · Docker users with a chatty containerStart the guide containers
Narrow down
Guides3
- GuideMake Docker Compose wait until the database is really ready, not just startedMake an app container wait until its database is really ready, not just started, with a healthcheck and depends_on in Docker Compose.5 steps · 3 min read
- GuideCheck a Docker Compose file with docker compose config before you start anythingValidate a Docker Compose file and see what Docker will really run with docker compose config, before you start anything and without changing your system.6 steps · 3 min read
- GuideStop Docker logs from filling your disk with log rotationStop one chatty container from filling your disk: set Docker log rotation in a Compose file or daemon.json, and avoid the catch that trips people up.9 steps · 8 min read
Docker66
- Tip
docker commit <container> myname/testimage:version3docker commit turns a container into an image, and --change edits its metadataSaves the current state of a container as a new image, with optional Dockerfile-style changes.3 Dec 2026 - Tip
docker stack config -c docker-compose.yml -c docker-compose.prod.ymldocker stack config prints the merged and interpolated stack fileOutputs the final Compose file after merging and variable substitution, before you deploy it to a swarm.3 Dec 2026 - Tip
docker swarm join-token workerdocker swarm join-token prints, and rotates, the secret for new nodesShows the command to add a worker or manager node to a swarm, and can replace the token.3 Dec 2026 - Tip
docker run --rm --mount src=logs,dst=/logs alpine mkdir -p /logs/app1 /logs/app2volume-subpath mounts a single folder of a volume into a containerMounts only a subdirectory of a named volume, so several containers can share one volume without seeing each other.3 Dec 2026 - TipPut Portainer environments in groups and give users access to a whole groupOrganizes environments into groups, so access and tags apply to all of them at once.2 Dec 2026
- TipPortainer's Edge Agent checks in every 5 seconds, and you can change thatSets how often Edge Agents call home to the Portainer server.2 Dec 2026
- Tip
docker run --rm --sysctl net.ipv4.ip_forward=1 alpine cat /proc/sys/net/ipv4/ip_forwarddocker run --sysctl sets a kernel parameter for one container onlyChanges a namespaced kernel setting inside a single container, without touching the host's settings.2 Dec 2026 - Tip
docker run -d --cidfile /tmp/app.cid nginxdocker run --cidfile saves the new container's ID to a fileWrites the ID of the container you start into a file, so a script can find it later.2 Dec 2026 - Tip
docker run --rm --user "$(id -u):$(id -g)" \docker run with your own user ID stops root-owned files in your foldersRun a one-off container as yourself so the files it writes are yours.30 Nov 2026 - Tip
docker run --rm alpine cat /proc/sys/net/ipv4/ip_unprivileged_port_startA non-root Docker container can already listen on port 80Docker sets a sysctl so container users can bind ports below 1024.30 Nov 2026 - Tip
docker run --rm alpine hostnameSet a hostname on a Docker container, or it changes every time you recreate itGive a container a fixed hostname so apps do not see a new machine after updates.30 Nov 2026 - Tip
docker attach mc-serverLeave docker attach with Ctrl+P Ctrl+Q, not Ctrl+CDetach from a container's console without stopping the process inside it.30 Nov 2026 - Tip
required: falseDepends_on with required: false lets a Compose service start without an optional dependencyOrder an optional service first when it exists, without failing when it does not.30 Nov 2026 - Tip
- /var/run/docker.sock:/var/run/docker.sock:roMounting the Docker socket read-only does not make it safeKnow that :ro on docker.sock still lets a container control Docker fully.30 Nov 2026 - Tip
docker inspect --format '{{.State.ExitCode}} OOMKilled={{.State.OOMKilled}}' myappOOMKilled in docker inspect tells you the container ran out of memoryFind out whether exit code 137 came from the memory limit.30 Nov 2026 - Tip
platform: linux/amd64Platform: linux/amd64 runs an x86 only Docker image on an ARM machineAsk for a specific image architecture when the default one does not exist.30 Nov 2026 - Tip
docker run --rm -e TZ=Europe/Amsterdam alpine dateTZ only sets a Docker container's clock when the image has tzdataFix container logs in UTC when setting TZ seemingly does nothing.30 Nov 2026 - Tip
docker network create --subnet 192.0.2.0/24 lanGive a Docker container a fixed IP on a network with your own subnetPin a container's address when a firewall rule or old client needs a fixed IP.30 Nov 2026 - Tip
docker ps --no-trunc --format 'table {{.Names}}\t{{.Command}}'docker ps with no-trunc shows the full command a container runsSee the complete start command and full IDs that docker ps normally cuts off.30 Nov 2026 - Tip
docker tag example/app:latest example/app:rollbackdocker tag the running image as rollback before you pull an updateKeep the old image under a second tag so you can go back after a bad update.30 Nov 2026 - Tip
ip netns add test1ip netns gives you a separate network stack on Linux to test inRun a command with its own interfaces and routes, apart from the rest of the system.30 Nov 2026 - Tip
docker ps -q | xargs docker inspect -f '{{.Name}} privileged={{.HostConfig.Privileged}}'One docker inspect line shows which containers run privileged, a quick security auditLists every running container together with its privileged flag.30 Nov 2026 - Tip
docker run --rm --gpus all ubuntu nvidia-smidocker run with gpus all gives a container your NVIDIA cardPass an NVIDIA GPU into a container for transcoding or machine learning.30 Nov 2026 - Tip
docker compose up -d --force-recreate webForce Docker Compose to recreate a container whose settings did not changeThrow away and recreate a service's containers when a fresh start is the fix.30 Nov 2026 - Tip
docker image inspect --format '{{json .Config.ExposedPorts}}' nginx:alpinedocker image inspect shows ports, user and variables before you run an imageRead an image's default ports, user, environment and stop signal without starting it.30 Nov 2026 - Tip
docker run --rm -v /etc/nginx nginx:alpine ls /etc/nginxAn empty Docker volume gets the image's files, a bind mount hides themKnow why a volume starts with default files while a bind mount starts empty.30 Nov 2026 - Tip
docker run --rm -e API_KEY example/app:1.0docker run -e NAME without a value copies the variable from your shellPass a secret from your shell into a container without typing it on the command line.30 Nov 2026 - Tip
docker run --rm --mount type=bind,src=/srv/apps/data,dst=/data alpine ls /dataDocker's mount syntax refuses a missing host folder where -v quietly creates itUse the mount syntax to catch a typo in a bind mount path before it costs you data.30 Nov 2026 - Tip
trivy config .trivy config checks a Dockerfile for security mistakes before you build itScans Dockerfiles and other config files for risky settings like running as root.30 Nov 2026 - Tip
docker compose stopdocker compose stop keeps your containers, down removes themPick stop for a pause and down for a clean slate.30 Nov 2026 - Tip
docker run -d --name web \Add :ro to a Docker bind mount when the container only needs to readMount config folders read-only so a container can read but never change them.30 Nov 2026 - Tip
docker run -d --name web --restart unless-stopped nginx:alpineDocker unless-stopped remembers that you stopped a container, always does notPick the restart policy that respects a container you stopped on purpose.30 Nov 2026 - Tip
capsh --printcapsh shows which capabilities a process has beyond normal permissionsLists the Linux capabilities of the current shell, including inside a container.30 Nov 2026 - Tip
services:Post_start runs a command in a Compose service right after it startsFix permissions or seed a file each time the container starts, without a custom image.30 Nov 2026 - Tip
docker run -d --name web --cap-drop ALL --cap-add NET_BIND_SERVICE -p 8080:80 nginxdocker run --cap-drop ALL strips every Linux capability from a containerRemoves every Linux capability from a container so you only add back what the app really needs.28 Nov 2026 - Tip
docker run --rm -it --security-opt no-new-privileges ubuntu bash–security-opt no-new-privileges stops a container process from gaining privilegesBlocks processes inside a container from gaining extra privileges through su, sudo or setuid binaries.28 Nov 2026 - Tip
docker run -d --name encoder --cpus="1.5" example/app:1.0docker run --cpus caps how much CPU a container can useSets a hard ceiling on the CPU a container may use, in whole or fractional cores.28 Nov 2026 - Tip
docker run --rm --pull always example/app:latestdocker run --pull always fetches the newest image before startingMakes docker run check the registry for a newer image first instead of using the cached one.28 Nov 2026 - Tip
docker wait nightly-jobdocker wait blocks until a container stops and prints its exit codeWaits for a container to stop, then prints its exit code, which is handy in scripts.28 Nov 2026 - Tip
docker pause my-appdocker pause freezes a container without stopping itSuspends every process in a container in place, until you unpause it.28 Nov 2026 - Tip
docker kill --signal=HUP my-proxydocker kill --signal=HUP sends a reload signal instead of killingSends any signal, such as HUP, to a container's main process without stopping the container.28 Nov 2026 - Tip
docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n"docker run --ulimit nofile raises the open files limit of one containerSets the soft and hard limit for open files of a single container.28 Nov 2026 - Tip
DB_HOST=192.168.1.10Docker run --env-file loads environment variables from a fileReads container environment variables from a file instead of a long row of -e flags.28 Nov 2026 - Tip
docker exec -it -u 1000:1000 -w /config mycontainer ls -ldocker exec -u and -w run a command as another user in another folderRuns a command inside a running container as a chosen user and from a chosen folder.28 Nov 2026 - Tip
FROM golang:1.26 AS buildDocker build --target stops the build at one named stageBuilds a multi-stage Dockerfile only up to the stage you name, for debugging or testing.28 Nov 2026 - Tip
docker export red_panda > latest.tardocker export -o saves a container filesystem as a tar fileWrites the full filesystem of a container, running or stopped, to a tar file.28 Nov 2026 - Tip
docker run -d --name worker --restart=on-failure:5 example/worker:1.0–restart on-failure:5 gives up after five crashesRestarts a container only after errors, and stops trying after a set number of attempts.28 Nov 2026 - Tip
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"docker stats --format picks the columns you care aboutShows only the stats columns you choose, such as name, CPU and memory, in one snapshot.28 Nov 2026 - Tip
docker run busybox foo; echo $?docker run exit codes 125, 126 and 127 tell you who failedExplains what exit codes 125, 126 and 127 mean when docker run fails to start a command.28 Nov 2026 - Tip
docker run -d --name app --memory=512m --memory-swap=512m example/app:1.0docker run --memory-swap decides whether a container may use swapSets memory plus swap together for a container, or turns swap off for it completely.28 Nov 2026 - Tip
docker compose down --remove-orphansdocker compose down --remove-orphans cleans up services you removed from the fileRemoves containers left behind by services you deleted or renamed in the compose file.28 Nov 2026 - Tip
docker compose ps --all --status=exiteddocker compose ps --status filters services by stateLists only the compose services in one state, such as exited or restarting.28 Nov 2026 - Tip
trivy image example/app:1.2trivy image scans a container image for known flawsScans a container image and shows only serious vulnerabilities that already have a fix.28 Nov 2026 - Tip
docker run -d --log-opt max-size=10m --log-opt max-file=3 <image>–log-opt max-size and max-file stop a container log from growing foreverRotates a container's json-file log by size and keeps a fixed number of old files.28 Nov 2026 - Tip
docker compose imagesdocker compose images lists the images behind your project's containersShows which images the containers of a Compose project use, as a table, JSON or only IDs.28 Nov 2026 - Tip
docker container prune --filter "until=24h"docker container prune --filter until= only removes old stopped containersRemoves only stopped containers older than a given age or with a given label.28 Nov 2026 - Tip
docker run -d --shm-size=1g <image>–shm-size gives a container a bigger /dev/shmRaises the size of /dev/shm inside a container, for programs that need more shared memory.28 Nov 2026 - Tip
docker run -d --stop-signal=SIGQUIT <image>–stop-signal chooses which signal docker stop sends firstSets the signal docker stop sends first, and shows how the grace period before SIGKILL works.28 Nov 2026 - Tip
Deploy the container → ReplaceDuplicate/Edit in Portainer replaces the container, it does not edit itExplains that editing a container in Portainer builds a new one and what gets lost on the way.27 Nov 2026 - Tip
services:Stop_grace_period gives a slow container more than 10 seconds to shut downLets a container finish its shutdown work before Docker kills it after the default 10 seconds.27 Nov 2026 - Tip
docker run -d --pids-limit 200 --name web nginxdocker run --pids-limit stops one container from forking your server to deathCaps how many processes a container may start, so a runaway or fork bomb stays inside it.26 Nov 2026 - Tip
docker inspect --format '{{.State.Health.Status}}' mycontainerdocker inspect tells you if a container is healthy, not just runningPrints the health status of a container, so you can tell a stuck app from one that is working.18 Nov 2026 - Tip
docker logs --since 10m -f container-namedocker logs --since 10m -f shows only what just happenedShows only the last few minutes of a container's log and follows new lines.17 Nov 2026 - Tip
docker run -d --read-only \Run a container with --read-only and a small tmpfsMakes a container's filesystem read-only, with writable memory-backed folders only where you allow them.1 Oct 2026 - Tip
tailscaled --state=mem:Run tailscaled with --state=mem: for a throwaway nodeStarts a Tailscale node that keeps no state on disk and is removed from the tailnet when done.8 Sep 2026 - Tip
docker run --init myimageAdd init: true when a container leaves zombie processes behindRuns a small init process first so signals are forwarded and finished child processes are cleaned up.24 Jun 2026
Shell4
- Tip
SHELL ["/bin/bash", "-c"]The SHELL instruction changes which shell RUN uses in a DockerfileOverrides the default shell for shell-form RUN, CMD and ENTRYPOINT lines in the rest of the Dockerfile.3 Dec 2026 - Tip
systemd-detect-virtsystemd-detect-virt tells a script whether it runs in a VM or containerLet a script check if it is on bare metal, in a VM or inside a container.30 Nov 2026 - Tip
journalctl -M mycontainer -bjournalctl -M reads the journal of a running local containerReads the journal of a running systemd container from the host by its machine name.26 Nov 2026 - Tip
sudo lsns -t netLsns lists the Linux namespaces on a host, including those of your containersLists namespaces and the processes in them, which shows how containers are separated.26 Nov 2026
Network3
- Tip
crane digest nginx:latestcrane digest prints the digest of an image tag straight from the registryPrints the sha256 digest of an image as the registry has it, so you can pin it.2 Dec 2026 - Tip
curl http://localhost:5000/v2/_catalogcurl /v2/_catalog lists the repositories in a self-hosted Docker registryAsks a registry over its HTTP API which repositories it holds.2 Dec 2026 - Tip
curl -X POST "https://portainer.example.com:9443/api/webhooks/638e6967-ef77-4906-8af8-236800621360"A portainer container webhook recreates one container when the registry gets a pushRedeploys a single Portainer-managed container with a fresh image when something calls its URL.6 Mar 2026
Python1
Home Assistant1
Posts2
Nothing matches.