Skip to content

Commit

Permalink
Merge pull request #55 from Dr-N00B/release-4.1
Browse files Browse the repository at this point in the history
Image change to debian
  • Loading branch information
santhoshdaivajna authored Oct 13, 2023
2 parents 615ba37 + ba84e4d commit fa2a68e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ build-cosign:
SAVE ARTIFACT /ko-app/cosign cosign

go-deps:
FROM gcr.io/spectro-images-public/golang:${GOLANG_VERSION}-alpine
FROM gcr.io/spectro-dev-public/edge-native/golang:${GOLANG_VERSION}-debian
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
RUN apk update
RUN apt-get update
SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum

Expand All @@ -39,11 +39,12 @@ BUILD_GOLANG:
ARG SRC

IF $FIPS_ENABLED
RUN go-build-fips.sh -a -o ${BIN} ./${SRC}
RUN assert-fips.sh ${BIN}
RUN assert-static.sh ${BIN}
ARG LDFLAGS=-s -w -linkmode=external -extldflags=-static
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=boringcrypto
ELSE
RUN go-build.sh -a -o ${BIN} ./${SRC}
ARG LDFLAGS=-s -w
ENV CGO_ENABLED=0
END

RUN go build -ldflags "${LDFLAGS}" -o ${BIN} ./${SRC}
Expand Down

0 comments on commit fa2a68e

Please sign in to comment.