Skip to content

Commit 0abcf47

Browse files
committed
Add an example of a systemd.service unit file
1 parent 7c12ca1 commit 0abcf47

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,25 @@ This Go program is a compatibility shim to allow the easy control of docker
44
containers via systemd service units.
55

66
[![Build Status](https://travis-ci.org/mback2k/docker-systemd-shim.svg?branch=master)](https://travis-ci.org/mback2k/docker-systemd-shim)
7+
8+
Usage
9+
-----
10+
The following is an example of a systemd.service unit file which uses this shim to control a container:
11+
12+
```
13+
[Unit]
14+
Description=Docker container: your-container-name
15+
Wants=network.target
16+
After=docker.service
17+
Requires=docker.service
18+
19+
[Service]
20+
Type=notify
21+
ExecStart=/usr/local/sbin/docker-systemd-shim --container=your-container-name
22+
Environment=DOCKER_API_VERSION=1.38
23+
24+
[Install]
25+
WantedBy=docker.service
26+
```
27+
28+
Replace `your-container-name` with the name of the container you want to control with this unit file.

0 commit comments

Comments
 (0)