mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(dogfood/Dockerfile): create /etc/suoders.d/nopasswd instead of COPY (#13900)
This commit is contained in:
@@ -91,6 +91,12 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN apt-get update && apt-get install --yes ca-certificates
|
||||
|
||||
COPY files /
|
||||
# We used to copy /etc/sudoers.d/* in from files/ but this causes issues with
|
||||
# permissions and layer caching. Instead, create the file directly.
|
||||
RUN mkdir -p /etc/sudoers.d && \
|
||||
echo 'coder ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/nopasswd && \
|
||||
chmod 750 /etc/sudoers.d/ && \
|
||||
chmod 640 /etc/sudoers.d/nopasswd
|
||||
|
||||
# Install packages from apt repositories
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Allow the Coder user to execute sudo without a password
|
||||
coder ALL=(ALL) NOPASSWD:ALL
|
||||
Reference in New Issue
Block a user