Setting Up Your Docker Engine

Make Docker’s defaults safer

Create or edit /etc/docker/daemon.json on Linux to set sane defaults. Then sudo systemctl restart docker.

{
  "log-driver": "json-file",
  "log-opts": { "max-size": "10m", "max-file": "3" },
  "default-address-pools": [
    { "base": "10.10.0.0/16", "size": 24 }
  ]
}
  • Why

    • The default json-file logger has no rotation - set a size and file count so logs don’t eat disks. Options must be strings in JSON. (Docker Documentation)

    • Changing default address pools avoids collisions with your LAN or VPN networks when Compose creates bridges. Use pools that fit your environment. (Docker Documentation)

Want IPv6 on bridges by default or other daemon flags later? The daemon config overview shows the supported keys and where the file lives. (Docker Documentation)

NVIDIA, AMD, and iGPU acceleration (optional)

  • NVIDIA - install the NVIDIA Container Toolkit on the host, then run containers with --gpus all. Test with an NVIDIA CUDA base image and nvidia-smi. (NVIDIA Docs)

  • AMD ROCm - use AMD’s Container Toolkit for ROCm workloads with Docker. Check their quick start and supported OS list. (Instinct Documentation), (GitHub)

  • Intel/AMD iGPU for VA-API - many media and ML containers just need /dev/dri passed through. Specifics vary by app, so check each project’s notes. (Unmanic)

Compose, Buildx, and a quick health check

  • Confirm the Compose plugin: docker compose version. This is v2 - the current, supported path. If migrating from v1, skim the migration notes. (Docker Documentation)

  • Buildx/BuildKit are included. Use them for multi-arch builds and faster caching. (Docker Documentation)


Everything on Shared Sapience is free and open to all. However, it takes a tremendous amount of time and effort to keep these resources and guides up to date and useful for everyone.

If enough of my amazing readers could help with just a few dollars a month, I could dedicate myself full-time to helping Seekers, Builders, and Protectors collaborate better with AI and work toward a better future.

Even if you can’t support financially, becoming a free subscriber is a huge help in advancing the mission of Shared Sapience.

If you’d like to help by becoming a free or paid subscriber, simply use the Subscribe/Upgrade button below, or send a one-time quick tip with Buy me a Coffee by clicking here. I’m deeply grateful for any support you can provide - thank you!

This post is for paid subscribers