mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2025-04-17 12:41:51 +00:00
Looks like the original Dockerfile builds on ARM too
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
8da5211bec
commit
b05e6819d5
3 changed files with 2 additions and 49 deletions
|
@ -21,11 +21,7 @@ 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.2/dumb-init_1.2.2_amd64" \
|
||||
&& chmod +x /usr/local/bin/dumb-init \
|
||||
&& apk --no-cache del --purge \
|
||||
curl
|
||||
dumb-init
|
||||
|
||||
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/
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
FROM arm64v8/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:
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/bin/dumb-init /bin/bash
|
||||
#!/usr/bin/dumb-init /bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Copy frontend if not available
|
||||
|
|
Loading…
Add table
Reference in a new issue