diff --git a/cmd/bigsky/Dockerfile b/cmd/bigsky/Dockerfile index 5b80aef8f..4534788ac 100644 --- a/cmd/bigsky/Dockerfile +++ b/cmd/bigsky/Dockerfile @@ -2,17 +2,38 @@ # # podman build -f ./cmd/bigsky/Dockerfile -t bigsky . -### Compile stage -FROM golang:1.22-alpine3.19 AS build-env +FROM golang:1.23.3-alpine3.19 AS custom-go RUN apk add --no-cache build-base make git +# Clone go source +RUN git clone https://go.googlesource.com/go /gosource + +WORKDIR /gosource + +# Checkout go version 1.23.3 +RUN git checkout go1.23.3 + +# Cherry pick the CL +RUN git fetch https://go.googlesource.com/go refs/changes/97/564197/1 && git cherry-pick FETCH_HEAD + +# Build go +RUN ./src/all.bash + +# Copy the artifacts to /export +RUN mkdir -p /export +RUN cp /gosource/bin/go /export/go + + +### Compile stage +FROM custom-go AS build-env + ADD . /dockerbuild WORKDIR /dockerbuild # timezone data for alpine builds ENV GOEXPERIMENT=loopvar RUN GIT_VERSION=$(git describe --tags --long --always) && \ - go build -tags timetzdata -o /bigsky ./cmd/bigsky + /export/go build -tags timetzdata -o /bigsky ./cmd/bigsky ### Build Frontend stage FROM node:18-alpine as web-builder diff --git a/cmd/bigsky/custom_go.Dockerfile b/cmd/bigsky/custom_go.Dockerfile new file mode 100644 index 000000000..12090a0f2 --- /dev/null +++ b/cmd/bigsky/custom_go.Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.23.3-alpine3.19 AS custom-go +RUN apk add --no-cache build-base make git + +# Clone go source +RUN git clone https://go.googlesource.com/go /gosource + +WORKDIR /gosource + +# Checkout go version 1.23.3 +RUN git checkout go1.23.3 + +# Cherry pick the CL +RUN git fetch https://go.googlesource.com/go refs/changes/97/564197/1 && git cherry-pick FETCH_HEAD + +# Build go +RUN ./src/all.bash + +# Copy the artifacts to /export +RUN mkdir -p /export +RUN cp /gosource/bin/go /export/go