Skip to content

Instantly share code, notes, and snippets.

@piotrplenik
Created March 24, 2017 09:00
Show Gist options
  • Select an option

  • Save piotrplenik/b39e11521452129af2af85cc855c91d7 to your computer and use it in GitHub Desktop.

Select an option

Save piotrplenik/b39e11521452129af2af85cc855c91d7 to your computer and use it in GitHub Desktop.

Revisions

  1. piotrplenik created this gist Mar 24, 2017.
    5 changes: 5 additions & 0 deletions docker
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # File: etc/default/docker

    # Use DOCKER_OPTS to modify the daemon startup options.
    #DOCKER_OPTS=""
    DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock"
    7 changes: 7 additions & 0 deletions docker.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # File: /lib/systemd/system/docker.service

    ## Add EnviromentFile + add "$DOCKER_OPTS" at end of ExecStart
    ## After change exec "systemctl daemon-reload"

    EnvironmentFile=/etc/default/docker
    ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS