3
在Ubuntu 15.04上使用systemd启动docker-compose
我有一个想通过systemd控制的docker-compose项目。在暴发户中,我将使用如下所示的脚本: description "Start/Stop server" author "Jim Cortez" start on filesystem and started docker stop on runlevel [!2345] respawn limit 3 240 pre-start script # wait (if necessary) for our docker context to be accessible while [ ! -f /projects/my_server/docker-compose.yml ] do sleep 1 done /usr/local/bin/docker-compose -f /projects/my_server/docker-compose.yml up -d end …