Skip to content
This repository was archived by the owner on Dec 21, 2025. It is now read-only.

Commit 7c41998

Browse files
authored
Merge pull request #115 from crazy-max/add-git
dockerfile: use ADD to clone repo
2 parents 96094e1 + 13d283f commit 7c41998

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ ARG XX_VERSION=1.4.0
88
ARG GO_VERSION=1.21
99

1010
FROM --platform=${BUILDPLATFORM:-linux/amd64} tonistiigi/xx:${XX_VERSION} AS xx
11-
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:${GO_VERSION}-alpine AS builder
12-
RUN apk --update --no-cache add file git
11+
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
12+
RUN apk --update --no-cache add file
1313
COPY --from=xx / /
1414
WORKDIR /src
1515
ARG CLOUDFLARED_VERSION
16-
RUN git clone --branch ${CLOUDFLARED_VERSION} https://github.com/cloudflare/cloudflared .
16+
ADD "https://github.com/cloudflare/cloudflared.git#${CLOUDFLARED_VERSION}" .
1717
ARG TARGETPLATFORM
18-
ENV GO111MODULE=on
1918
ENV CGO_ENABLED=0
2019
RUN xx-go build -v -mod=vendor -trimpath -o /bin/cloudflared \
2120
-ldflags="-w -s -X 'main.Version=${CLOUDFLARED_VERSION}' -X 'main.BuildTime=${BUILD_DATE}'" \

0 commit comments

Comments
 (0)