Skip to content

Commit

Permalink
Update Cloudflared to 2024.10.1 and remove upx.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knight1 committed Oct 29, 2024
1 parent b16a64b commit 8d0ba94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG ALPINE_VERSION=3.20
ARG UPSTREAM_RELEASE_TAG=2024.10.0
ARG UPSTREAM_RELEASE_TAG=2024.10.1

FROM alpine:${ALPINE_VERSION} AS gobuild
ARG ALPINE_VERSION
Expand All @@ -8,14 +8,12 @@ ARG UPSTREAM_RELEASE_TAG
WORKDIR /tmp

RUN apk add --no-cache gcc build-base curl tar go &&\
if [ "$(uname -m)" != "riscv64" ]; then apk add --no-cache upx; fi &&\
mkdir release &&\
curl -L "https://github.com/cloudflare/cloudflared/archive/refs/tags/${UPSTREAM_RELEASE_TAG}.tar.gz" | tar xvz --strip 1 -C ./release

WORKDIR /tmp/release/cmd/cloudflared

RUN go build -ldflags="-X 'main.Version=$UPSTREAM_RELEASE_TAG' -X 'main.BuildTime=$(date +%B\ %Y)' -s -w" &&\
if [ "$(uname -m)" != "riscv64" ]; then upx --best cloudflared; fi
RUN go build -ldflags="-X 'main.Version=$UPSTREAM_RELEASE_TAG' -X 'main.BuildTime=$(date +%B\ %Y)' -s -w"

FROM alpine:${ALPINE_VERSION}

Expand Down

0 comments on commit 8d0ba94

Please sign in to comment.