TUN-8130: Install go tool chain in /tmp on build agents
This commit is contained in:
parent
cf5be91d2d
commit
ecd101d485
|
@ -1,3 +1,4 @@
|
||||||
|
cd /tmp
|
||||||
git clone -q https://github.com/cloudflare/go
|
git clone -q https://github.com/cloudflare/go
|
||||||
cd go/src
|
cd go/src
|
||||||
# https://github.com/cloudflare/go/tree/34129e47042e214121b6bbff0ded4712debed18e is version go1.21.5-devel-cf
|
# https://github.com/cloudflare/go/tree/34129e47042e214121b6bbff0ded4712debed18e is version go1.21.5-devel-cf
|
||||||
|
|
|
@ -15,7 +15,7 @@ COPY . .
|
||||||
RUN .teamcity/install-cloudflare-go.sh
|
RUN .teamcity/install-cloudflare-go.sh
|
||||||
|
|
||||||
# compile cloudflared
|
# compile cloudflared
|
||||||
RUN PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" make cloudflared
|
RUN PATH="/tmp/go/bin:$PATH" make cloudflared
|
||||||
|
|
||||||
# use a distroless base image with glibc
|
# use a distroless base image with glibc
|
||||||
FROM gcr.io/distroless/base-debian11:nonroot
|
FROM gcr.io/distroless/base-debian11:nonroot
|
||||||
|
|
|
@ -10,10 +10,8 @@ COPY . .
|
||||||
|
|
||||||
RUN .teamcity/install-cloudflare-go.sh
|
RUN .teamcity/install-cloudflare-go.sh
|
||||||
|
|
||||||
RUN PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" go env
|
|
||||||
|
|
||||||
# compile cloudflared
|
# compile cloudflared
|
||||||
RUN GOOS=linux GOARCH=amd64 PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" make cloudflared
|
RUN GOOS=linux GOARCH=amd64 PATH="/tmp/go/bin:$PATH" make cloudflared
|
||||||
|
|
||||||
# use a distroless base image with glibc
|
# use a distroless base image with glibc
|
||||||
FROM gcr.io/distroless/base-debian11:nonroot
|
FROM gcr.io/distroless/base-debian11:nonroot
|
||||||
|
|
|
@ -11,7 +11,7 @@ COPY . .
|
||||||
RUN .teamcity/install-cloudflare-go.sh
|
RUN .teamcity/install-cloudflare-go.sh
|
||||||
|
|
||||||
# compile cloudflared
|
# compile cloudflared
|
||||||
RUN GOOS=linux GOARCH=arm64 PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" make cloudflared
|
RUN GOOS=linux GOARCH=arm64 PATH="/tmp/go/bin:$PATH" make cloudflared
|
||||||
|
|
||||||
# use a distroless base image with glibc
|
# use a distroless base image with glibc
|
||||||
FROM gcr.io/distroless/base-debian11:nonroot-arm64
|
FROM gcr.io/distroless/base-debian11:nonroot-arm64
|
||||||
|
|
|
@ -6,5 +6,5 @@ RUN apt-get update
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN .teamcity/install-cloudflare-go.sh
|
RUN .teamcity/install-cloudflare-go.sh
|
||||||
# compile cloudflared
|
# compile cloudflared
|
||||||
RUN PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" make cloudflared
|
RUN PATH="/tmp/go/bin:$PATH" make cloudflared
|
||||||
RUN cp /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
|
RUN cp /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
|
||||||
|
|
Loading…
Reference in New Issue