Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 05348ce

Browse files
authored
Merge pull request #9416 from mmitche/fix-alpine-legs
Fix alpine file ownership issues with newer docker
2 parents 9db1b6d + 9ff4188 commit 05348ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/docker/alpine.3.6/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ FROM microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156
99
# This Dockerfile doesn't use the USER_ID, but the parameter needs to be declared to prevent docker
1010
# from issuing a warning
1111
ARG USER_ID=0
12+
RUN adduser code_executor -u ${USER_ID} -G root -D
13+
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
14+
15+
# With the User Change, we need to change permssions on these directories
16+
RUN chmod -R a+rwx /usr/local
17+
RUN chmod -R a+rwx /home
18+
19+
# Set user to the one we just created
20+
USER ${USER_ID}
1221

1322
# Set working directory
1423
WORKDIR /opt/code

0 commit comments

Comments
 (0)