Skip to content

Commit

Permalink
CGO is fine in all these cases
Browse files Browse the repository at this point in the history
  • Loading branch information
worm committed Dec 17, 2023
1 parent f419b5e commit 0fb20d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lyrebird/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN git clone --depth=1 --branch=${VERSION} https://gitlab.torproject.org/tpo/an

FROM --platform=$BUILDPLATFORM docker.io/library/golang:alpine AS build
ARG TARGETOS TARGETARCH
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath" CGO_ENABLED=0
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath"
COPY --from=source /go/src /go/src
WORKDIR /go/src
RUN --mount=type=cache,target=/go/pkg go mod download
Expand Down
4 changes: 2 additions & 2 deletions snowflake-standalone/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ RUN git clone --depth=1 --branch=${VERSION} https://gitlab.torproject.org/tpo/an

FROM --platform=$BUILDPLATFORM docker.io/library/golang:alpine AS build
ARG TARGETOS TARGETARCH
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath" CGO_ENABLED=0
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath"
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 go build -ldflags '-w -s -buildid=' .

FROM docker.io/library/alpine:latest
FROM ghcr.io/cyberworm-uk/base:latest
RUN apk --no-cache --no-interactive add ca-certificates tzdata
COPY --from=build /go/src/proxy/proxy /bin/proxy
USER 1000
Expand Down
2 changes: 1 addition & 1 deletion snowflake/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN git clone --depth=1 --branch=${VERSION} https://gitlab.torproject.org/tpo/an

FROM --platform=$BUILDPLATFORM docker.io/library/golang:alpine AS build
ARG TARGETOS TARGETARCH
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath" CGO_ENABLED=0
ENV GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOFLAGS="-buildvcs=false -trimpath"
COPY --from=source /go/src /go/src
WORKDIR /go/src/client
RUN --mount=type=cache,target=/go/pkg go mod download
Expand Down

0 comments on commit 0fb20d9

Please sign in to comment.