Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the location of config file in Docker 1.9?

In the version 1.8 of Docker we could find the docker config file under /etc/sysconfig

However, after installing Docker 1.9 I cant see the docker config file under /etc/sysconfig

What is the new location of the config file??

Distribution: Centos 7.1

like image 789
meallhour Avatar asked Dec 14 '15 03:12

meallhour


1 Answers

It sounds like you have moved from the CentOS distributed docker to the docker.com docker-engine packages as CentOS hasn't moved to 1.9 yet.

The CentOS packages will make use of the /etc/sysconfig standard. Dockers packages will not. You will also miss out on the docker-storage-setup program RedHat built to deal with their unique storage requirements.

The systemd config 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 then, how do I configure the docker-engine installed docker service?

Docker have a page on setting up the systemd config. You can go either CentOS or Docker with your config

  • Docker - edit the docker-engine systemd config file /usr/lib/systemd/system/docker.service with your required options
  • Centos - copy the EnvironmentFile setup and then configure your options in /etc/sysconfig/docker.
like image 134
Matt Avatar answered Sep 20 '22 00:09

Matt