-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker): add restart-docker-daemon task and executable
This commit adds a new task `restart-docker-daemon` to the `Taskfile.dist.yaml` and an executable script to be able to restart the Docker daemon. It uses `systemctl` to restart the daemon in Linux systems and `service` if the system is WSL.
- Loading branch information
1 parent
422014a
commit 8431f6b
Showing
3 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
chezmoi/dot_local/bin/executable_restart-docker-daemon.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# {{ template "scripts-library" }} | ||
|
||
log_task "Restarting Docker daemon" | ||
# {{ if .system.is_wsl }} | ||
# service restart fails if the service was never started | ||
c service docker restart || c service docker start || true | ||
# {{ else }} | ||
c systemctl restart docker | ||
# {{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters