Skip to content

Commit

Permalink
Update Containerfile
Browse files Browse the repository at this point in the history
armv7 golang:alpine no longer seems happy without gcc/cgo
  • Loading branch information
cyberworm-uk authored Aug 17, 2023
1 parent 68111d6 commit 6d60110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obfs4/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM docker.io/library/golang:alpine AS build
COPY --from=source /go/src /go/src
WORKDIR /go/src/obfs4proxy
RUN go mod download
RUN if [[ "`go env | grep "^GOARCH=" | sed 's:^GOARCH="\(.*\)"$:\1:'`" != "arm" ]]; then CGO_ENABLED=0 go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath -buildmode=pie .;else CGO_ENABLED=0 go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath .;fi
RUN if [[ "`go env | grep "^GOARCH=" | sed 's:^GOARCH="\(.*\)"$:\1:'`" != "arm" ]]; then CGO_ENABLED=0 go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath -buildmode=pie .;else apk add gcc musl-dev && go build -buildvcs=false -ldflags '-w -s -buildid=' -trimpath .;fi

FROM scratch
COPY --from=build /go/src/obfs4proxy/obfs4proxy /obfs4proxy

0 comments on commit 6d60110

Please sign in to comment.