Skip to content

Instantly share code, notes, and snippets.

@f0
Created March 10, 2014 16:14
Show Gist options
  • Save f0/9468136 to your computer and use it in GitHub Desktop.
Save f0/9468136 to your computer and use it in GitHub Desktop.
[Unit]
Description = Docker with enabled TCP Socket
After=etcd.service
After=docker.service
[Service]
Environment="http_proxy=http://xxx:3128"
Environment="https_proxy=http://xxx:3128"
Environment="no_proxy=index.example.com"
ExecStartPre=/usr/bin/systemctl kill docker
ExecStartPre=/bin/mount --make-rprivate /
# Run docker but don't have docker automatically restart
# containers. This is a job for systemd and unit files.
ExecStart=/usr/bin/docker -d -r=false -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock
[Install]
WantedBy=local.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment