$ docker build -t alpine-app -f - . <<Dockerfile
FROM alpine:3.8
RUN addgroup -g 1000 app \
&& adduser -u 1000 -D -G app app
Dockerfile
Sending build context to Docker daemon 69.68kB
Step 1/2 : FROM alpine:3.8
---> 491e0ff7a8d5
Step 2/2 : RUN addgroup -g 1000 app && adduser -u 1000 -D -G app app
---> Using cache
---> 5fe088289331
Successfully built 5fe088289331
Successfully tagged alpine-app:latest
$ unit docker run --rm alpine-app sh -c "cat /etc/passwd | grep app"
app:x:1000:1000:Linux User,,,:/home/app:/sbin/halt
Last active
February 27, 2019 20:08
-
-
Save renatomefi/1d009279d06422ffa2aa51cb4ff63f43 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment