Skip to content

Commit

Permalink
Add $CONTAINER_USER to sudo users
Browse files Browse the repository at this point in the history
  • Loading branch information
yagop authored Dec 9, 2023
1 parent 0fc0e50 commit 54f14f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cargo/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ ARG GITHUB_TOKEN

# Install dependencies
RUN apt-get update \
&& apt-get install -y git curl gcc clang ninja-build libudev-dev unzip xz-utils\
python3 python3-pip python3-venv libusb-1.0-0 libssl-dev pkg-config libpython2.7 \
&& apt-get install -y git curl gcc clang ninja-build libudev-dev unzip xz-utils \
python3 python3-pip python3-venv libusb-1.0-0 libssl-dev pkg-config libpython2.7 sudo \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts

# Add $CONTAINER_USER to sudo users
RUN echo $CONTAINER_USER ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$CONTAINER_USER \
&& chmod 0440 /etc/sudoers.d/$CONTAINER_USER

# Set users
RUN adduser --disabled-password --gecos "" ${CONTAINER_USER}
USER ${CONTAINER_USER}
Expand Down

0 comments on commit 54f14f9

Please sign in to comment.