Skip to content

Commit

Permalink
TUN-8130: Install go tool chain in /tmp on build agents
Browse files Browse the repository at this point in the history
  • Loading branch information
chungthuang committed Jan 9, 2024
1 parent cf5be91 commit ecd101d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .teamcity/install-cloudflare-go.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cd /tmp
git clone -q https://github.com/cloudflare/go
cd go/src
# https://github.com/cloudflare/go/tree/34129e47042e214121b6bbff0ded4712debed18e is version go1.21.5-devel-cf
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY . .
RUN .teamcity/install-cloudflare-go.sh

# 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
FROM gcr.io/distroless/base-debian11:nonroot
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ COPY . .

RUN .teamcity/install-cloudflare-go.sh

RUN PATH="/go/src/github.com/cloudflare/cloudflared/go/bin:$PATH" go env

# 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
FROM gcr.io/distroless/base-debian11:nonroot
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY . .
RUN .teamcity/install-cloudflare-go.sh

# 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
FROM gcr.io/distroless/base-debian11:nonroot-arm64
Expand Down
2 changes: 1 addition & 1 deletion dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ RUN apt-get update
COPY . .
RUN .teamcity/install-cloudflare-go.sh
# 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/

0 comments on commit ecd101d

Please sign in to comment.