Skip to content

Instantly share code, notes, and snippets.

View osallou's full-sized avatar

Olivier Sallou osallou

View GitHub Profile
@osallou
osallou / README.md
Last active April 26, 2021 15:23 — forked from mosquito/README.md
Add docker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@osallou
osallou / get_volume_mounts.sh
Created October 23, 2017 10:39 — forked from mbentley/get_volume_mounts.sh
Get docker volume mounts via `docker inspect`
for i in $(docker ps -aq)
do
echo -n "Volumes for ${i}: "
docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' ${i}
done