build: use nomad-builder docker image to build Nomad (#25626)

This introduces a docker image based off of ubuntu:bionic that can be used to
compile Nomad binary against glibc 2.27.

The image cannot build JS assets, which must be created before we compile the
Go binary.
This commit is contained in:
Piotr Kazmierczak
2025-04-14 09:27:17 +02:00
committed by GitHub
parent 85c30dfd1e
commit 36e91be7ee
2 changed files with 46 additions and 15 deletions

28
.github/nomad-builder/Dockerfile vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
ARG GO_VERSION
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
build-essential \
ca-certificates \
crossbuild-essential-arm64 \
curl \
gcc-aarch64-linux-gnu \
git \
xz-utils \
zip
# Get Go and get Going ;)
RUN curl -L https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /opt -zxv
ENV PATH="/root/go/bin:/opt/go/bin:$PATH"
RUN git config --global --add safe.directory /build
WORKDIR /build