Skip to content

Commit bd9f78f

Browse files
authored
Merge pull request #44 from AllenShen/feature/add_cache
update config
2 parents 36434a5 + eaaf876 commit bd9f78f

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

Dockerfile-muiti-architecture

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,29 @@ ARG TARGETVARIANT=""
1111

1212
ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT}
1313
ENV GOPROXY=https://goproxy.cn,direct
14+
ENV GOCACHE=/gocache
1415

1516
COPY go.mod go.sum ./
1617
COPY api/v2/go.mod api/v2/go.sum ./api/v2/
1718
RUN go mod download
1819

1920
COPY . .
2021

21-
RUN make release-binary
22+
RUN --mount=type=cache,id=gobuild,target=/gocache make release-binary
2223

23-
FROM alpine:3.14.0 AS gomplate
24-
25-
ARG TARGETOS
26-
ARG TARGETARCH
27-
ARG TARGETVARIANT
28-
29-
ENV GOMPLATE_VERSION=v3.9.0
30-
31-
RUN wget -O /usr/local/bin/gomplate-amd64 "https://resource.koderover.com/gomplate_linux-amd64" \
32-
&& chmod +x /usr/local/bin/gomplate-amd64
33-
34-
RUN wget -O /usr/local/bin/gomplate-arm64 "https://resource.koderover.com/gomplate_linux-arm64" \
35-
&& chmod +x /usr/local/bin/gomplate-arm64
24+
#FROM alpine:3.14.0 AS gomplate
25+
#
26+
#ARG TARGETOS
27+
#ARG TARGETARCH
28+
#ARG TARGETVARIANT
29+
#
30+
#ENV GOMPLATE_VERSION=v3.9.0
31+
#
32+
#RUN wget -O /usr/local/bin/gomplate-amd64 "https://resource.koderover.com/gomplate_linux-amd64" \
33+
# && chmod +x /usr/local/bin/gomplate-amd64
34+
#
35+
#RUN wget -O /usr/local/bin/gomplate-arm64 "https://resource.koderover.com/gomplate_linux-arm64" \
36+
# && chmod +x /usr/local/bin/gomplate-arm64
3637

3738
FROM alpine:3.14.0
3839

@@ -59,8 +60,8 @@ COPY --from=builder /usr/local/src/dex/api/v2/go.mod /usr/local/src/dex/api/v2/g
5960
COPY --from=builder /go/bin/dex /usr/local/bin/dex
6061
COPY --from=builder /usr/local/src/dex/web /srv/dex/web
6162

62-
#COPY --from=gomplate /usr/local/bin/gomplate-${TARGETARCH} /usr/local/bin/gomplate
6363
COPY bins/gomplate-${TARGETARCH} /usr/local/bin/gomplate
64+
RUN chmod +x /usr/local/bin/gomplate
6465

6566
USER 1001:1001
6667

bins/gomplate-amd64

100644100755
File mode changed.

bins/gomplate-arm64

100644100755
File mode changed.

0 commit comments

Comments
 (0)