[Unit] Description=Hello World Service Requires=docker.service After=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill helloworld ExecStartPre=-/usr/bin/docker rm -f helloworld ExecStartPre=/usr/bin/docker pull mattbailey/helloworld:latest ExecStart=/usr/bin/docker run --name helloworld mattbailey/helloworld:latest ExecStartPost=/usr/bin/sh -c 'echo -n FLANNEL_IP= > /run/helloworld.env' ExecStartPost=/usr/bin/sh -c 'sleep 5; docker inspect helloworld | jq -r .[].NetworkSettings.IPAddress >> /run/helloworld.env' ExecStop=-/usr/bin/docker stop helloworld [X-Fleet] Conflicts=helloworld@*