From 4f8a102f754d2cfb16b6ee657b76543963ffcd37 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 20 Aug 2023 08:55:39 +0100 Subject: [PATCH] sigh --- obfs4/Containerfile | 2 +- snowflake-standalone/Containerfile | 2 +- snowflake/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/obfs4/Containerfile b/obfs4/Containerfile index 77fc803..f64499b 100644 --- a/obfs4/Containerfile +++ b/obfs4/Containerfile @@ -8,7 +8,7 @@ ARG TARGETOS TARGETARCH COPY --from=source /go/src /go/src WORKDIR /go/src/obfs4proxy RUN --mount=type=cache,target=/go/pkg go mod download -RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath `if [[ "$TARGETARCH" != "arm" ]]; then echo "-buildmode=pie"; fi` . +RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath . FROM scratch COPY --from=build /go/src/obfs4proxy/obfs4proxy /obfs4proxy diff --git a/snowflake-standalone/Containerfile b/snowflake-standalone/Containerfile index c96e5f1..d7eea61 100644 --- a/snowflake-standalone/Containerfile +++ b/snowflake-standalone/Containerfile @@ -8,7 +8,7 @@ ARG TARGETOS TARGETARCH COPY --from=source /go/src /go/src WORKDIR /go/src/proxy RUN --mount=type=cache,target=/go/pkg go mod download -RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath `if [[ "$TARGETARCH" != "arm" ]]; then echo "-buildmode=pie"; fi` . +RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath . FROM docker.io/library/alpine:latest RUN apk -U upgrade --no-cache diff --git a/snowflake/Containerfile b/snowflake/Containerfile index 89addee..96a7200 100644 --- a/snowflake/Containerfile +++ b/snowflake/Containerfile @@ -8,7 +8,7 @@ ARG TARGETOS TARGETARCH COPY --from=source /go/src /go/src WORKDIR /go/src/client RUN --mount=type=cache,target=/go/pkg go mod download -RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath `if [[ "$TARGETARCH" != "arm" ]]; then echo "-buildmode=pie"; fi` . +RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath . FROM scratch COPY --from=build /go/src/client/client /client