Note: If docker daemon does not start at boot, you might want to enable the docker service
1 systemctl enabledocker.service
Here are the steps.
Create the file /etc/systemd/system/docker_demo_container.service
1 2 3 4 5 6 7 8 9 10 11 [Unit] Wants=docker.service After=docker.service [Service] RemainAfterExit=yes ExecStart=/usr/bin/dockerstart my_container_name ExecStop=/usr/bin/dockerstop my_container_name [Install] WantedBy=multi-user.target
Now I can start […]
Recent Comments