Skip to content

Instantly share code, notes, and snippets.

@clok
Created May 4, 2016 17:13
Show Gist options
  • Save clok/26ee86f5a0729ebc3ca36db2857cc0b6 to your computer and use it in GitHub Desktop.
Save clok/26ee86f5a0729ebc3ca36db2857cc0b6 to your computer and use it in GitHub Desktop.
Netuitive Fleet service
[Unit]
Description=Netuitive
Requires=docker.socket
After=docker.socket
[Service]
ExecStartPre=-/usr/bin/docker stop netuitive-agent
ExecStartPre=-/usr/bin/docker rm netuitive-agent
ExecStartPre=/bin/sh -c "docker history netuitive/docker-agent:latest >/dev/null || docker pull netuitive/docker-agent:latest"
ExecStart=/usr/bin/docker run --privileged --name netuitive-agent -h %H -v /proc:/host_proc:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -e DOCKER_HOSTNAME=%H -e APIKEY=efbda858cbadc958ccbb62c675180412 netuitive/docker-agent
[Install]
WantedBy=multi-user.target
[X-Fleet]
Global=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment