-
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.
feat: add
sotrage-driver-setup.sh
to avoid wrong filesystem
durin…
…g Docker build.
- Loading branch information
1 parent
f6e1a5f
commit 97fe627
Showing
1 changed file
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
if [[ $UID != 0 ]]; then | ||
echo "Please run this script with sudo:" | ||
echo "sudo $0 $*" | ||
exit 1 | ||
fi | ||
|
||
_file="/etc/docker/daemon.json" | ||
_service="docker.service" | ||
|
||
## Stop Docker Service | ||
if [[ $(systemctl is-active ${_service}) == "active" ]]; then | ||
systemctl stop ${_service} | ||
fi | ||
|
||
## Create daemon.json file along with the following lines. | ||
if [[ ! -f ${_file} ]]; then | ||
echo "{ | ||
\"storage-driver\": \"vfs\" | ||
}" > ${_file} | ||
fi | ||
|
||
## Start Docker Service | ||
systemctl start ${_service} |