Skip to content

Commit

Permalink
Install Golang 1.19 for docker build and release build
Browse files Browse the repository at this point in the history
Starting with Go 1.21, the runtime system needs to have a version
of glibc "compatible" with the version available at build time.
The ubi8 image comes with a very old version of glibc compared to the golang builder.
so, the NCP Operator binaries will fail to run and hit GLIBC issue.

To fix this issue, we need to install Golang manually in ubi8 image when making docker build.
Moreover, we use Golang 1.19 for Github workflow build action. To align this workflow,
we install Golang 1.19 for Github workflow build tag action and Docker image build.

Fix issue:vmware#237
  • Loading branch information
timdengyun committed Nov 27, 2023
1 parent a14a240 commit d15f2e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
build:
runs-on: [ubuntu-latest]
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v1
with:
go-version: 1.19
- uses: actions/checkout@v2
- name: Build Operator image and push to registry
env:
Expand Down
1 change: 1 addition & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM golang:1.19.10 as golang-build
FROM registry.access.redhat.com/ubi8/ubi:latest

LABEL name="nsx-container-plugin-operator"
Expand Down

0 comments on commit d15f2e8

Please sign in to comment.