Page MenuHomeDevCentral

Create a systemd unit to start relevant docker containers
Closed, ResolvedPublic


Some Docker containers should be started manually.

Prepare a script to run them, then a systemd unit to call this script.

In a first time, this script could be as easy as (extracted from P91):

docker start acquisitariat devcentral wolfphab etherpad otrs_demo

Then, we could make it more powerful with a configuration file somewhere listing the containers to run.

Event Timeline

dereckson raised the priority of this task from to High.
dereckson updated the task description. (Show Details)
dereckson added subscribers: dereckson, Sandlayth.

Per #nasqueron-ops message at 23:32:16.

Sandlayth closed this task as Resolved.EditedSep 1 2015, 19:10

Files created:

  • List of containers:  /etc/containers.conf
  • Script wich gets names from the list: /usr/lib/systemd/system/get-containers-list
  • Script in order to {start,stop} containers:  /usr/lib/systemd/system/docker_{start,stop}
  • Service to automate launching containers : /usr/lib/systemd/system/docker-containers.service

Ths service has been successfully enabled using

sudo systemctl enable docker-containers.service

Some improvement is needed, as D20 and T467#4446 are contradictory.