Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure Linux 3 Docker image #24

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/geninfra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions images.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
22 changes: 22 additions & 0 deletions src/azurelinux/3.0/amd64/default/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# 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