123456789101112131415161718192021222324252627282930313233343536 |
- # This is a systemd file to run this docker container under systemd.
- # To make this work:
- # * pull the image (probably from ops docker registry)
- # * place this file in /etc/systemd/system without the .systemd extension
- # * run the commands:
- # systemctl daemon-reload
- # systemctl enable pcp-docker
- # systemctl start pcp-docker
- #
- #
- [Unit]
- Description=PCP Collector Contatainer
- Requires=docker.service
- After=docker.service
- [Service]
- Type=simple
- TimeoutStartSec=5m
- #Slice=container-small.slice
- ExecStartPre=-/usr/bin/docker rm "oso-f22-host-monitoring"
- ExecStart=/usr/bin/docker run --rm --name=oso-f22-host-monitoring \
- --privileged --net=host --pid=host --ipc=host \
- -v /sys:/sys:ro -v /etc/localtime:/etc/localtime:ro \
- -v /var/lib/docker:/var/lib/docker:ro -v /run:/run \
- -v /var/log:/var/log \
- docker-registry.ops.rhcloud.com/ops/oso-f22-host-monitoring
- ExecReload=-/usr/bin/docker stop "oso-f22-host-monitoring"
- ExecReload=-/usr/bin/docker rm "oso-f22-host-monitoring"
- ExecStop=-/usr/bin/docker stop "oso-f22-host-monitoring"
- [Install]
- WantedBy=default.target
|