You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/install-docker.sh
+15-18Lines changed: 15 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -4,34 +4,30 @@ set -e
4
4
5
5
## What this?
6
6
## Script to setup docker in a fresh alpine instance :D
7
-
## Credit goes to richart24se's gist: https://gist.github.com/richard24se/336cb2502400a63f4670c751eaca1929, is modified to add login script for zsh, fix usermod not found, remove build packages and fix docker-compose install (now install from registry, install from pip will error).
8
-
9
-
# change to root and install packages
10
-
su -c "apk add sudo shadow curl openrc"
11
-
# if your user doesn't exists then remove sudo passwords
12
-
USERNAME=$(whoami)
13
-
su -c "grep -qxF '${USERNAME} ALL=(ALL) NOPASSWD: ALL' /etc/sudoers || echo '${USERNAME} ALL=(ALL) NOPASSWD: ALL' | tee -a /etc/sudoers"
14
-
# install docker, docker-compose
15
-
sudo apk add docker docker-compose
7
+
8
+
# Install deps
9
+
apk add openrc docker docker-compose
10
+
16
11
# mount cgroup
17
-
echo"cgroup /sys/fs/cgroup cgroup defaults 0 0"| sudo tee -a /etc/fstab
18
-
# add perm docker
19
-
sudo usermod -aG docker ${USERNAME}
12
+
grep -qxF 'cgroup /sys/fs/cgroup cgroup defaults 0 0' /etc/fstab ||echo'cgroup /sys/fs/cgroup cgroup defaults 0 0'| tee -a /etc/fstab
0 commit comments