fix: Add coder user to docker group on installation (#2693)

This makes for a simpler setup, and reduces the likelihood
a user runs into a strange issue.
This commit is contained in:
Kyle Carberry
2022-06-27 14:12:43 -05:00
committed by GitHub
parent 752d6096a1
commit abfae1b4aa

View File

@ -11,4 +11,14 @@ if ! id -u $USER >/dev/null 2>&1; then
--user-group \ --user-group \
--shell /bin/false \ --shell /bin/false \
$USER $USER
# Add the Coder user to the Docker group.
# Coder is frequently used with Docker, so
# this prevents failures when building.
#
# It's fine if this fails!
usermod \
--append \
--groups docker \
$USER 2>/dev/null || true
fi fi