Docker Tips

From NIEF Wiki
Revision as of 01:08, 4 February 2022 by Jeff.Krug (talk | contribs)
Jump to navigation Jump to search

Intro

This just has a handful of frequently encountered issues we have had with docker deploys that are worth noting in case they happen to others.

Docker Storage

Sometimes Docker doesn't seem to release file system records correctly and can fill an entire file system, but a simple reboot of the computer may fix things. Possible it may be necessary to do execute the following command:

    docker system prune

Docker DNS Failure

It appears that sometimes docker containers can lose the ability to resolve domain names. We haven't identified an exact cause for this or even for certain if the following is a consistent fix for it, but it is worth trying. Hardcode DNS server information in the docker config file daemon.json located in /etc/docker. You would replace #.#.#.# with the IP address of your local DNS server.

    {
        "dns": ["#.#.#.#", "8.8.8.8"]
    } 

Typically the above would require a reboot or at least a complete restart of docker.