Files
sys/unix/linux/Dockerfile
Kir Kolyshkin b731f782ac unix/linux: switch to ubuntu 25.04, Go 1.25.1
Ubuntu 24.10 is not supported since July 2025 (and some of its apt repos
are apparently removed), and so mkall.sh no longer works (as of today).

Fix this by switching to (currently supported) Ubuntu 25.04.

NOTE that we can't switch to
 - Ubuntu 24.04 LTS release (see CL 618075);
 - Ubuntu 25.10 as it lacks mips support;
 - Debian Stable (13) as it also lacks mips support.

Also, bump Go to 1.25.1.

No changes in generated content after running

	GOOS=linux GOARCH=amd64 ./mkall.sh

Change-Id: I58a4856cda93a85af51f4a519c6e4e25f31a39b4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/706915
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
2025-10-08 14:29:00 -07:00

59 lines
2.2 KiB
Docker

FROM ubuntu:25.04
# Disable interactive prompts on package installation
ENV DEBIAN_FRONTEND=noninteractive
# Dependencies to get the git sources and go binaries
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
rsync \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Get the git sources. If not cached, this takes O(5 minutes).
WORKDIR /git
RUN git config --global advice.detachedHead false
# Linux Kernel: Released 27 Jul 2025
RUN git clone --branch v6.16 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 29 Jan 2025
RUN git clone --branch release/2.41/master --depth 1 https://sourceware.org/git/glibc.git
# Get Go
ENV GOLANG_VERSION=1.25.1
ENV GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256=7716a0d940a0f6ae8e1f3b3f4f36299dc53e31b16840dbd171254312c41ca12e
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz
ENV PATH=/usr/local/go/bin:$PATH
# Linux and Glibc build dependencies and emulator
RUN apt-get update && apt-get install -y --no-install-recommends \
bison gawk make python3 \
gcc gcc-multilib \
gettext texinfo \
qemu-user \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Cross compilers (install recommended packages to get cross libc-dev)
RUN apt-get update && apt-get install -y \
gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \
gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \
gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \
gcc-powerpc-linux-gnu gcc-powerpc64-linux-gnu \
gcc-powerpc64le-linux-gnu gcc-riscv64-linux-gnu \
gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \
gcc-loongarch64-linux-gnu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Let the scripts know they are in the docker environment
ENV GOLANG_SYS_BUILD=docker
WORKDIR /build/unix
ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]