Skip to content

Commit

Permalink
Create and use a proper user in the alpine Dockerfile
Browse files Browse the repository at this point in the history
Closes #1596
  • Loading branch information
aeneasr committed Dec 19, 2019
1 parent e5b5de0 commit 75d2b7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile-alpine
Expand Up @@ -3,11 +3,13 @@
# $ GO111MODULE=on GOOS=linux GOARCH=amd64 go build && docker build -t oryd/hydra:v1.0.0-rc.7_oryOS.10 . && rm hydra
FROM alpine:3.10

RUN addgroup -S ory; \
adduser -S ory -G ory -D -H -s /bin/nologin
RUN apk add -U --no-cache ca-certificates

COPY hydra /usr/bin/hydra

USER 1000
USER ory

ENTRYPOINT ["hydra"]
CMD ["serve", "all"]

0 comments on commit 75d2b7d

Please sign in to comment.