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