Fix devcontainer Dockerfile build (#8358)

Something has changed in the base image such that the directory
/etc/sudoers.d doesn't exist. Simple fix, `mkdir -p` that directory
before we write to it.
This commit is contained in:
Fraser Waters 2021-11-04 21:00:32 +00:00 committed by GitHub
parent 414ef7e9d0
commit f8a98b2a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USER_NAME \
&& useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash -m $USER_NAME \
&& mkdir -p /etc/sudoers.d \
&& echo "$USER_NAME ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER_NAME \
&& chmod 0440 /etc/sudoers.d/$USER_NAME