Docker options are missing after upgrade
Docker options that were previously set are missing after a Docker upgrade.
Causes
This issue can occur because the file /lib/systemd/system/docker.service is overwritten after you upgrade Docker.
Resolving the problem
Reconfigure the Docker service configuration file /etc/docker/daemon.json and the Docker environment file /etc/systemd/system/docker.service.d/docker-env-icp.conf, by completing the following steps:
-
Edit the
config.yamlfile that is on your boot node by setting thedocker_configanddocker_envparameters. The following code snippet shows an example of this configuration:# Docker configuration option, more options see # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file docker_config: log-opts: max-size: "100m" max-file: "10" # Docker environment setup docker_env: - HTTP_PROXY=http://1.2.3.4:3128 - - HTTPS_PROXY=http://1.2.3.4:3128 - - NO_PROXY=localhost,127.0.0.1,{{ cluster_CA_domain }} -
For Ubuntu clusters, you can use the
-loption to reconfigure Docker on specific cluster nodes.sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception-$(uname -m | sed 's/x86_64/amd64/g'):3.2.0-ee reconfig-docker -l <node_IP> -
If your boot node is one of your cluster nodes, reconfigure Docker on the boot node manually.
./icp-docker-18.06.2_x86_64.bin --reconfig --docker_env "HTTP_PROXY=http://1.2.3.4:3128 HTTPS_PROXY=http://1.2.3.4:3128 NO_PROXY=localhost,127.0.0.1,mycluster.icp" --docker_config '{ "log-opts": { "max-file": "10", "max-size": "100m" } }'