DOCKER_OPTS do not work in config file /etc/default/docker

前端 未结 9 1006
野性不改
野性不改 2020-12-13 09:59

I have changed /etc/default/docker with DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock\" (docker version 1.4.1 in ubuntu 14.0

9条回答
  •  孤街浪徒
    2020-12-13 10:46

    I had a similar challenge. When I started looking to begin moving some systems from Ubuntu 14.04 to Ubuntu 16.04. My goal was to use one dockerd configuration file with dockerd flags (DOCKER_OPTS) for both Ubuntu 16.04 (systemd) and Ubuntu 14.04 (Upstart) other than /etc/docker/daemon.json. I chose not to use /etc/docker/daemon.json for docker daemon configuration because json does not support comments.

    I wanted a systemd design to use an override file, which only modifies dockerd flags. It uses the default Docker systemd configuration file (/lib/systemd/system/docker.service) for other Docker settings. Another objective was to customise systemd on each system after each change or boot.

    It solves my challenge. It may help you.

    https://github.com/BradleyA/docker-scripts/tree/master/dockerd-configuration-options

    git clone https://github.com/BradleyA/docker-scripts
    cd docker-scripts/dockerd-configuration-options
    

提交回复
热议问题