Skip to content

dris (docker-run-in-systemd) is a tool that (tries to) simplify the management of systemd services for apps that run in docker containers.

Notifications You must be signed in to change notification settings

stang/docker-run-in-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

README

dris (docker-run-in-systemd) is a tool that (tries to) simplify the management of systemd services for apps that run in docker containers.

If you know how to run a container, you can use dris run instead of docker run and expect the container to run as a systemd service, which would automatically restart on-failure, and at boot time.

Disclaimer: Although I'm using this to run some pet projects, this HAS NOT been thoroughly tested.

Installation

curl -sSL https://raw.githubusercontent.com/stang/docker-run-in-systemd/main/get-dris.sh | sudo sh

Usage

# list all DRIS services
dris ps

# docker run 'nginx' thru systemd (with autoboot)
dris run --net host -v /data/www:/usr/share/nginx/html:ro nginx:1.18

# deploy newer version of nginx
dris run --net host -v /data/www:/usr/share/nginx/html:ro nginx:latest

# stop the service (and disable autoboot)
dris stop nginx

# uninstall the service
yes | dris rm nginx

Known limitations

Because we aimed for simplicity, the service name is infered from the DOCKER_IMAGE. Therefore, calling dris run with the same image would override the existing config.

At the moment, you can't dris run the same DOCKER_IMAGE more than once on a given host.

About

dris (docker-run-in-systemd) is a tool that (tries to) simplify the management of systemd services for apps that run in docker containers.

Topics

Resources

Stars

Watchers

Forks

Languages