We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ccda51 commit 4b47485Copy full SHA for 4b47485
1 file changed
go/Dockerfile
@@ -13,6 +13,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
13
apt-get clean -y && \
14
rm -r /var/cache/* /var/lib/apt/lists/*
15
16
+# Create the user
17
+ARG USERNAME=user
18
+ARG USER_UID=1000
19
+ARG USER_GID=$USER_UID
20
+
21
+RUN groupadd --gid $USER_GID $USERNAME && \
22
+ useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
23
24
+USER user
25
26
ENV GOPATH=/go
27
28
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
0 commit comments