dockerimg: change base container image to ubuntu 24.04 with go 1.24.3
Changes the base Docker image from golang:1.24-bookworm (Debian 12) to
ubuntu:24.04 (Noble Numbat - current LTS) and installs Go 1.24.3 manually.
Changes include:
1. Updated FROM ubuntu:24.04 to use current Ubuntu LTS instead of Debian
2. Added ca-certificates and wget for Go downloads
3. Manual Go 1.24.3 installation from official golang.org tarball
4. Proper GOROOT, GOPATH, and PATH environment setup
5. Created GOPATH directory structure
This provides a cleaner foundation based on the current Ubuntu LTS
while maintaining full Go development capabilities. The manual Go
installation gives more control over the exact Go version used and
eliminates dependency on the golang base image layers.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s0bc05e04441c24a6k
diff --git a/dockerimg/Dockerfile.base b/dockerimg/Dockerfile.base
index ca16e5c..b47b450 100644
--- a/dockerimg/Dockerfile.base
+++ b/dockerimg/Dockerfile.base
@@ -1,4 +1,4 @@
-FROM golang:1.24-bookworm
+FROM ubuntu:24.04
# Switch from dash to bash by default.
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
@@ -15,14 +15,33 @@
'path-exclude=/usr/share/zoneinfo/*' \
> /etc/dpkg/dpkg.cfg.d/01_nodoc
+# Install system packages including ca-certificates for Go downloads
RUN apt-get update; \
apt-get install -y --no-install-recommends \
+ ca-certificates wget \
git jq sqlite3 npm nodejs gh ripgrep fzf python3 curl vim chromium lsof iproute2 less && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /usr/share/{doc,doc-base,info,lintian,man,groff,locale,zoneinfo}/*
-ENV PATH="$GOPATH/bin:$PATH"
+# Install Go 1.24
+ENV GO_VERSION=1.24.3
+ENV GOROOT=/usr/local/go
+ENV GOPATH=/go
+ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
+
+RUN ARCH=$(uname -m) && \
+ case $ARCH in \
+ x86_64) GOARCH=amd64 ;; \
+ aarch64) GOARCH=arm64 ;; \
+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
+ esac && \
+ wget -O go.tar.gz "https://golang.org/dl/go${GO_VERSION}.linux-${GOARCH}.tar.gz" && \
+ tar -C /usr/local -xzf go.tar.gz && \
+ rm go.tar.gz
+
+# Create GOPATH directory
+RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 755 "$GOPATH"
# While these binaries install generally useful supporting packages,
# the specific versions are rarely what a user wants so there is no