[Unit] Description=v2 Registry server for Docker [Service] Type=simple ExecStart=/usr/bin/registry serve /etc/docker-distribution/registry/config.yml Restart=on-failure ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/docker-distribution.pid' ExecStopPost=/bin/rm -f /var/run/docker-distribution.pid [Install] WantedBy=multi-user.target