[Unit]
Description=docker-register
After=docker.service

[Service]
EnvironmentFile=/etc/environment
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill docker-register
ExecStartPre=-/usr/bin/docker rm docker-register
ExecStartPre=/usr/bin/docker pull jwilder/docker-register
ExecStart=/usr/bin/docker run --name docker-register -e HOST_IP=${COREOS_PRIVATE_IPV4} -e ETCD_HOST=${COREOS_PRIVATE_IPV4}:4001 -v /var/run/docker.sock:/var/run/docker.sock jwilder/docker-register
ExecStop=/usr/bin/docker stop docker-register

[X-Fleet]
Global=true
