-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblank.service
More file actions
28 lines (26 loc) · 831 Bytes
/
blank.service
File metadata and controls
28 lines (26 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[Unit]
Description=
Requires=docker.service data.mount
After=docker.service data.mount
#PartOf=
#ReloadPropagatedFrom=
#RequiresMountsFor=/data
[Service]
Environment=CONTAINER=#put here the container's name
Environment=IMAGE=#put here the docker image name
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker stop ${CONTAINER}
ExecStartPre=-/usr/bin/docker rm ${CONTAINER}
#ExecStartPre=-/usr/bin/docker login -u <username> -p <password> -e <email> <private registry url> #<- change here !
ExecStartPre=-/usr/bin/docker pull ${IMAGE}
ExecStart=/usr/bin/docker run --name ${CONTAINER} ${IMAGE}
ExecStop=/usr/bin/docker stop ${CONTAINER}
ExecStop=/usr/bin/docker rm ${CONTAINER}
Restart=always
RestartSec=10
[X-Fleet]
#Conflicts=apache@*.service
#MachineOf=owncloud_db.service
#Global=true
#MachineMetadata=disk=ssd
#MachineID=sdfsfe8