Skip to content

Commit

Permalink
Use a custom Go build with netpoller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 committed Nov 13, 2024
1 parent 785ad18 commit 8833d87
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
27 changes: 24 additions & 3 deletions cmd/bigsky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions cmd/bigsky/custom_go.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8833d87

Please sign in to comment.