Skip to content

Commit 789e878

Browse files
committed
fix: Add coder user to docker group on installation
This makes for a simpler setup, and reduces the likelihood a user runs into a strange issue.
1 parent 3a3aa49 commit 789e878

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

preinstall.sh

+10
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,14 @@ if ! id -u $USER >/dev/null 2>&1; then
1111
--user-group \
1212
--shell /bin/false \
1313
$USER
14+
15+
# Add the Coder user to the Docker group.
16+
# Coder is frequently used with Docker, so
17+
# this prevents failures when building.
18+
#
19+
# It's fine if this fails!
20+
usermod \
21+
--append \
22+
--groups docker \
23+
$USER 2>/dev/null || true
1424
fi

0 commit comments

Comments
 (0)