mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2025-04-17 12:41:51 +00:00
[#65] Provide Dockerfile for arm64v8 architecture
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
8738d621fe
commit
655e94d104
1 changed files with 43 additions and 0 deletions
43
Dockerfile.arm64v8
Normal file
43
Dockerfile.arm64v8
Normal file
|
@ -0,0 +1,43 @@
|
|||
FROM golang:alpine as builder
|
||||
|
||||
ADD . /go/src/github.com/Luzifer/nginx-sso
|
||||
WORKDIR /go/src/github.com/Luzifer/nginx-sso
|
||||
|
||||
ENV CGO_ENABLED=0 \
|
||||
GOOS=linux \
|
||||
GOARCH=arm64
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --update \
|
||||
git \
|
||||
&& go install \
|
||||
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
||||
-mod=readonly
|
||||
|
||||
|
||||
FROM arm64v8/alpine
|
||||
|
||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||||
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add \
|
||||
bash \
|
||||
ca-certificates \
|
||||
curl \
|
||||
&& curl -sSfLo /usr/local/bin/dumb-init "https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_aarch64" \
|
||||
&& chmod +x /usr/local/bin/dumb-init \
|
||||
&& apk --no-cache del --purge \
|
||||
curl
|
||||
|
||||
COPY --from=builder /go/bin/nginx-sso /usr/local/bin/
|
||||
COPY --from=builder /go/src/github.com/Luzifer/nginx-sso/config.yaml /usr/local/share/nginx-sso/
|
||||
COPY --from=builder /go/src/github.com/Luzifer/nginx-sso/docker-start.sh /usr/local/bin/
|
||||
COPY --from=builder /go/src/github.com/Luzifer/nginx-sso/frontend/* /usr/local/share/nginx-sso/frontend/
|
||||
|
||||
EXPOSE 8082
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-start.sh"]
|
||||
CMD ["--"]
|
||||
|
||||
# vim: set ft=Dockerfile:
|
Loading…
Add table
Reference in a new issue