From df4a4da00ce033d67dddcb2ddf804f1ba85e5ccc Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 23 Oct 2024 13:17:15 +0200 Subject: [PATCH] unix/linux: adjust Dockerfile ENV key value format This fixes the following warnings emitted when running mkall.sh on GOOS=linux with a recent Docker version: 6 warnings found (use --debug to expand): - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 4) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 24) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 25) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 26) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 33) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 56) Also see https://docs.docker.com/reference/build-checks/legacy-key-value-format/ Change-Id: Icdf05cbe7b8650fc2fec84e010c7401807f5f75f Reviewed-on: https://go-review.googlesource.com/c/sys/+/621956 Reviewed-by: Ian Lance Taylor Auto-Submit: Tobias Klauser LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov --- unix/linux/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unix/linux/Dockerfile b/unix/linux/Dockerfile index 3d4baee5d..5cfd42e17 100644 --- a/unix/linux/Dockerfile +++ b/unix/linux/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.10 # Disable interactive prompts on package installation -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive # Dependencies to get the git sources and go binaries RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -21,16 +21,16 @@ RUN git clone --branch v6.11 --depth 1 https://kernel.googlesource.com/pub/scm/l RUN git clone --branch release/2.40/master --depth 1 https://sourceware.org/git/glibc.git # Get Go -ENV GOLANG_VERSION 1.23.0 -ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 905a297f19ead44780548933e0ff1a1b86e8327bb459e92f9c0012569f76f5e3 +ENV GOLANG_VERSION=1.23.0 +ENV GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz +ENV GOLANG_DOWNLOAD_SHA256=905a297f19ead44780548933e0ff1a1b86e8327bb459e92f9c0012569f76f5e3 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 +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 \ @@ -53,6 +53,6 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Let the scripts know they are in the docker environment -ENV GOLANG_SYS_BUILD docker +ENV GOLANG_SYS_BUILD=docker WORKDIR /build/unix ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]