From add0600fe8977e5ba52e424dd139189e6949fe9c Mon Sep 17 00:00:00 2001 From: qmuntal Date: Wed, 23 Oct 2024 11:21:50 +0200 Subject: [PATCH 1/2] add Azure Linux 3 docker image --- src/azurelinux/3.0/amd64/default/Dockerfile | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/azurelinux/3.0/amd64/default/Dockerfile diff --git a/src/azurelinux/3.0/amd64/default/Dockerfile b/src/azurelinux/3.0/amd64/default/Dockerfile new file mode 100644 index 0000000..c316f21 --- /dev/null +++ b/src/azurelinux/3.0/amd64/default/Dockerfile @@ -0,0 +1,22 @@ +# mcr.microsoft.com/azurelinux/base/core:3.0 doesn't distribute a PowerShell package, +# see https://github.com/microsoft/azurelinux/pull/2799. +# Use the .NET SDK image as a base image instead, which includes PowerShell and +# the necessary dependencies to use it (i.e. .NET Runtime and .NET SDK). +FROM mcr.microsoft.com/dotnet/sdk:9.0-azurelinux3.0-amd64 + +# Install dependencies needed to build, test, and longtest Go. +RUN set -eux; \ + # Upgrade all packages per https://eng.ms/docs/more/containers-secure-supply-chain/updating. + tdnf update -y; \ + tdnf install -y \ + binutils \ + ca-certificates \ + gcc \ + git \ + glibc \ + glibc-devel \ + iana-etc \ + kernel-headers \ + mercurial \ + ; \ + tdnf clean all From 30196abb7b19d48b600a25a2578696ec957e4b77 Mon Sep 17 00:00:00 2001 From: qmuntal Date: Wed, 23 Oct 2024 11:22:08 +0200 Subject: [PATCH 2/2] update geninfra to support Azure Linux --- cmd/geninfra/main.go | 2 +- images.md | 5 +++++ manifest.json | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/cmd/geninfra/main.go b/cmd/geninfra/main.go index 514198c..cbe577f 100644 --- a/cmd/geninfra/main.go +++ b/cmd/geninfra/main.go @@ -59,7 +59,7 @@ func run(cmd *cobra.Command, args []string) error { var os string switch distro { - case "cbl-mariner", "debian", "ubuntu": + case "cbl-mariner", "debian", "ubuntu", "azurelinux": os = "linux" default: log.Printf("Didn't recognize distro, update %v: %v\n", "cmd/gen/main.go", distro) diff --git a/images.md b/images.md index e3147a4..d450ef2 100644 --- a/images.md +++ b/images.md @@ -8,6 +8,11 @@ If a build hasn't occurred yet, the list may be out of date. For an accurate but harder to use list of currently available tags, see [the list API](https://mcr.microsoft.com/v2/microsoft-go/infra-images/tags/list). +`azurelinux-3.0-amd64-default` ([src/azurelinux/3.0/amd64/default](./src/azurelinux/3.0/amd64/default/Dockerfile)) +``` +mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default +``` + `cbl-mariner-2.0-amd64-default` ([src/cbl-mariner/2.0/amd64/default](./src/cbl-mariner/2.0/amd64/default/Dockerfile)) ``` mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default diff --git a/manifest.json b/manifest.json index 0418be0..a11c2eb 100644 --- a/manifest.json +++ b/manifest.json @@ -10,6 +10,22 @@ "id": "infra-images", "name": "microsoft-go/infra-images", "images": [ + { + "productVersion": "", + "sharedTags": {}, + "platforms": [ + { + "architecture": "amd64", + "dockerfile": "src/azurelinux/3.0/amd64/default", + "os": "linux", + "osVersion": "3.0", + "tags": { + "azurelinux-3.0-amd64-default": {}, + "azurelinux-3.0-amd64-default-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {} + } + } + ] + }, { "productVersion": "", "sharedTags": {},