Set錯docker systemd unit

spawn左幾萬個container出黎,搞到docker完全開唔到咁濟😂

新config

[Unit]
Description=ACD container
Requires=docker.service
After=docker.service

[Service]
Restart=always
ExecStart=/usr/bin/docker run --name docker_acd -v /home/saren/.cache/acd_cli:/root/.cache/acd_cli:rw -v /home/saren/Dropbox/setup-acd-docker.sh:/root/setup-acd-docker.sh:ro --cap-add SYS_ADMIN --device /dev/fuse -p 8081:22 acdcli_base /bin/bash /root/setup-acd-docker.sh
ExecStop=/bin/bash -c "docker stop docker_acd && docker rm docker_acd"

[Install]
WantedBy=local.target

有問題既舊config

[Unit]
Description=ACD container
Requires=docker.service
After=docker.service

[Service]
Restart=always
ExecStart=/usr/bin/docker run -v /home/saren/.cache/acd_cli:/root/.cache/acd_cli:rw -v /home/saren/Dropbox/setup-acd-docker.sh:/root/setup-acd-docker.sh:ro --cap-add SYS_ADMIN --device /dev/fuse -p 8081:22 acdcli_base /bin/bash /root/setup-acd-docker.sh
ExecStop=/usr/bin/docker stop -t 2 acdcli_base

[Install]
WantedBy=local.target

Recommendations

Last modified: 2016-03-13 15:11:45
Powered by Simple Blog