GroundWork recommends keeping some container logs on disk for support and troubleshooting purposes. The default settings for Docker retain too much data to be useful, so we recommend making the following changes on production systems. 

Logging Control

Add or edit the docker daemon logging control file.

  1. Log in as root to your GroundWork server and edit the file /etc/docker/daemon.json.

    This file may or may not exist, depending on your Docker version and package. 

  2. Add (or edit) the log driver section to look like the following:

      "log-driver": "json-file",
      "log-opts": {
        "max-size": "10m",
        "max-file": "3",
        "labels": "production_status",
        "env": "os,customer"
  3. If you are already running GroundWork and are adding this setting, you will have logs that will take some time to truncate.  

Related Resources