diff --git a/preinstall.sh b/preinstall.sh index 932dab26b04f7..79614f195df5b 100644 --- a/preinstall.sh +++ b/preinstall.sh @@ -11,4 +11,14 @@ if ! id -u $USER >/dev/null 2>&1; then --user-group \ --shell /bin/false \ $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