From b3734e9ff9072ff5c11e614a0e92cd3563e0db46 Mon Sep 17 00:00:00 2001 From: mason Date: Mon, 11 Nov 2019 16:09:46 -0800 Subject: [PATCH] FIX: removed static 'passwd' & 'group' files. --- Dockerfile | 5 +++-- group | 1 - passwd | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 group delete mode 100644 passwd diff --git a/Dockerfile b/Dockerfile index 0d35d08..a0927cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,9 @@ COPY . . RUN mkdir ./bin && \ CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -tags netgo -installsuffix netgo -o ./bin/goStatic && \ mkdir ./bin/etc && \ - cp ./passwd ./bin/etc && \ - cp ./group ./bin/etc + UI=$(( ( RANDOM % 9999 ) + 99 )) && \ + echo "appuser:x:$ID:$ID::/sbin/nologin:/bin/false" > ./bin/etc/passwd && \ + echo "appgroup:x:$ID:appuser" > ./bin/etc/group # stage 1 FROM scratch diff --git a/group b/group deleted file mode 100644 index 14bf15f..0000000 --- a/group +++ /dev/null @@ -1 +0,0 @@ -appgroup:x:1231:appuser diff --git a/passwd b/passwd deleted file mode 100644 index 403de03..0000000 --- a/passwd +++ /dev/null @@ -1 +0,0 @@ -appuser:x:1234:1231::/home/appuser:/bin/false