What is the location of the configuration file in Docker 1.9?

In version 1.8 of Docker, we could find the docker configuration file in the / etc / sysconfig directory

However, after installing Docker 1.9, I can not see the docker configuration file in / etc / sysconfig

What is the new location of the configuration file?

Distribution: Centos 7.1

+5
source share
1 answer

It looks like you switched from CentOS distributed by docker to docker.com docker-engine , since CentOS did not move to 1.9.

CentOS packages will use the /etc/sysconfig standard. Docker packages will not be. You'll also miss the docker-storage-setup RedHat program, designed to address your unique storage requirements.

The systemd configuration in /usr/lib/systemd/system/docker.service will show you the difference:

Docker

 [Service] Type=notify ExecStart=/usr/bin/docker daemon -H fd:// MountFlags=slave LimitNOFILE=1048576 LimitNPROC=1048576 

CentOS

 [Service] Type=notify EnvironmentFile=-/etc/sysconfig/docker EnvironmentFile=-/etc/sysconfig/docker-storage EnvironmentFile=-/etc/sysconfig/docker-network Environment=GOTRACEBACK=crash ExecStart=/usr/bin/docker daemon $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $ADD_REGISTRY \ $BLOCK_REGISTRY \ $INSECURE_REGISTRY LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity MountFlags=slave TimeoutStartSec=1min Restart=on-failure 

So how do I configure the docker docker-engine installed service?

Docker has a page for configuring systemd . You can go either CentOS or Docker with your configuration

  • Docker - edit the docker-engine systemd /usr/lib/systemd/system/docker.service configuration file with the necessary parameters
  • Centos - copy the EnvironmentFile setting and then configure your settings in /etc/sysconfig/docker .
+6
source

Source: https://habr.com/ru/post/1238053/


All Articles