mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-12-20 04:41:17 +00:00
Move Docker image to use non-root user
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6eb40a044a
commit
ad7c1dd693
1 changed files with 4 additions and 1 deletions
|
@ -6,12 +6,13 @@ WORKDIR /go/src/github.com/Luzifer/nginx-sso
|
|||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --update \
|
||||
&& apk add --no-cache \
|
||||
git \
|
||||
&& go install \
|
||||
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
||||
-mod=readonly
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||||
|
@ -30,6 +31,8 @@ COPY --from=builder /go/src/github.com/Luzifer/nginx-sso/frontend/* /usr/l
|
|||
EXPOSE 8082
|
||||
VOLUME ["/data"]
|
||||
|
||||
USER 1000:1000
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-start.sh"]
|
||||
CMD ["--"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue