brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: read the warnings at the end of docker info after installing Docker

Docker
~/tips/tip-docker-info-warnings

docker info --format '{{json .Warnings}}'

Spot missing kernel features that silently disable memory limits or networking.

docker info prints a long list of settings, and at the very bottom, easy to scroll past, any warnings the daemon has about your system. Those lines explain bugs that are otherwise very hard to pin down.

docker info --format '{{json .Warnings}}'

That prints only the warnings, or null when there are none. A classic one is No swap limit support: the kernel was booted without swap accounting, so --memory-swap settings have no effect. Others point at bridge netfilter being disabled, which can break traffic between containers, or at an API that listens on TCP without TLS.

I would run it once after installing Docker on a new machine and again after a kernel or distribution upgrade. While you are there, a few other fields are worth a glance:

docker info --format '{{.LoggingDriver}} {{.CgroupDriver}} {{.DockerRootDir}}'

That tells you the default log driver, whether cgroups are managed by systemd, and where all images and volumes live on disk.

A warning is not always a problem for you. Swap limits, for example, only matter if you use them. Fixes usually involve kernel boot parameters or modules, so read your distribution’s docs before you change anything there.

Further reading: docker system info, Troubleshoot the Docker daemon

More Docker tips ONBUILD RUN /usr/local/bin/python-build --dir /app/src SHELL ["/bin/bash", "-c"] docker commit <container> myname/testimage:version3 docker import /path/to/exampleimage.tgz docker compose events All Docker tips (192) All topics

Link