mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-12-20 12:51: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
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --update \
|
&& apk add --no-cache \
|
||||||
git \
|
git \
|
||||||
&& go install \
|
&& go install \
|
||||||
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
||||||
-mod=readonly
|
-mod=readonly
|
||||||
|
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
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
|
EXPOSE 8082
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/docker-start.sh"]
|
ENTRYPOINT ["/usr/local/bin/docker-start.sh"]
|
||||||
CMD ["--"]
|
CMD ["--"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue