Skip to content

Commit 9385940

Browse files
authored
fix: add sudo user for bionic-arm32v7 agent (microsoft#33)
* fix: add sudo user for bionic-arm32v7 agent * temp: publish image * Revert "temp: publish image" This reverts commit 9014063.
1 parent e1577bb commit 9385940

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

bionic-arm32v7/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM arm32v7/ubuntu:bionic
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5+
RUN groupadd --gid 1000 builduser \
6+
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
7+
58
RUN apt-get update && apt-get install -y --no-install-recommends \
69
software-properties-common \
710
gcc \
@@ -23,5 +26,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2326
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
2427
RUN python --version
2528

26-
RUN mkdir -p /root/vscode
27-
WORKDIR /root/vscode
29+
# No Sudo Prompt
30+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
31+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
32+
33+
USER builduser
34+
WORKDIR /home/builduser

0 commit comments

Comments
 (0)