4.1. Containers - start/stop

Installation type Difficulty to do this

Running as a Systemd service

Easy

Running in a container

Setup needed - see below

4.1.1. Example config.yaml

actions:
  - title: Stop Plex
    shell: docker stop plex

  - title: Start plex
    shell: docker start plex

4.1.2. Setup if running inside a container

You can control other containers, when running OliveTin inside a container itself, however you need to do some extra setup when creating the OliveTin container.

1) Pass /var/run/docker.sock as a bind mount to the container when creating it, eg:

docker create -v /var/run/docker.sock:/var/run/docker.sock ...additional args here...

Or, using the docker run syntax;

docker run -v /var/run/docker.sock:/var/run/docker.sock --name OliveTin jamesread/olivetin

2) The official x86_64 docker container comes with the docker client pre-installed. If you are using arm or and arm64 container, you will need to add Docker yourself.

docker exec -it olivetin dnf install -y docker
Note
The reason that the arm and arm64 containers do not container docker, is that when these images are cross-compiled at build time, it takes FOREVER because we have to emulate arm.

After that, you should be able to setup docker actions like it’s shown in the example above.