Skip to content

Commit 4bb4c40

Browse files
committed
Solve file permissions issues with UID
1 parent 0920b34 commit 4bb4c40

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
FROM golang:1.13
2+
3+
ARG USER_ID
4+
ARG GROUP_ID
5+
6+
# Install dependencies
27
RUN rm -rf /usr/local/go
38
RUN wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
49
RUN tar -C /usr/local -xzf go1.13.4.linux-amd64.tar.gz
@@ -7,9 +12,10 @@ RUN echo "deb https://deb.nodesource.com/node_12.x stretch main\ndeb-src https:/
712
RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
813
RUN apt-get update && apt-get install -y git libx11-dev tor net-tools sudo gdb strace x11vnc xvfb less apt-transport-https nodejs firefox-esr vim
914
RUN apt-get clean
10-
RUN useradd -ms /bin/bash snowflake
11-
RUN adduser snowflake sudo
12-
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
15+
16+
# Add a Snowflake user
17+
RUN addgroup --gid $GROUP_ID snowflake
18+
RUN adduser --disabled-password --uid $USER_ID --gid $GROUP_ID snowflake
1319
USER snowflake
1420
RUN go get -u github.com/smartystreets/goconvey
1521
COPY script.sh /go/bin/

0 commit comments

Comments
 (0)