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

feat: add .NET9 on 24.10 #697

Merged
merged 2 commits into from
Jan 9, 2025
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
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "Chiselled Ubuntu .NET8 Tests"
name: "Chiselled Ubuntu .NET9 Tests"

on: push

env:
runtime-deps-image-name: ubuntu/dotnet-deps:test
runtime-image-name: ubuntu/dotnet-runtime:test
aspnet-image-name: ubuntu/dotnet-aspnet:test
dotnet-version: "8.0"
dotnet-version: "9.0"
skopeo-image: 'quay.io/skopeo/stable:v1.15.1'

jobs:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ubuntu-release: ["24.04"]
ubuntu-release: ["24.10"]

steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.100-rc.2.23502.2"
dotnet-version: "9.0.x"

# Setup QEMU and Docker buildx
- name: Set up QEMU
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Build the .NET runtime deps container image
run: |
set -x
archs=`cat rockcraft.*.dotnet-deps-8.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
archs=`cat rockcraft.*.dotnet-deps-9.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
buildx_platforms="linux/$(echo ${archs} | sed 's/ /,linux\//g')"

docker buildx build \
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Build the .NET runtime container image
run: |
set -x
archs=`cat rockcraft.*.dotnet-runtime-8.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
archs=`cat rockcraft.*.dotnet-runtime-9.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
buildx_platforms="linux/$(echo ${archs} | sed 's/ /,linux\//g')"

docker buildx build \
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
- name: Build the ASP.NET Core runtime container image
run: |
set -x
archs=`cat rockcraft.*.dotnet-aspnet-8.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
archs=`cat rockcraft.*.dotnet-aspnet-9.0-${{ matrix.ubuntu-release }}.yaml | shyaml get-value platforms | shyaml keys`
buildx_platforms="linux/$(echo ${archs} | sed 's/ /,linux\//g')"

docker buildx build \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Chiselled .NET 8.0
# Chiselled .NET 9.0

Chiselled Ubuntu container images for .NET 8.0.
Chiselled Ubuntu container images for .NET 9.0.

Find more details about each image and their usage at:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG UBUNTU_RELEASE=24.04
ARG UBUNTU_RELEASE=24.10
ARG USER=app UID=101 GROUP=app GID=101
ARG CHISEL_VERSION=1.0.0

FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:da20fb875cfefd317c49e7aaf3998d3e5ad42c5b20f34a0eec6dca2fe4fbb8f4 AS builder
FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:fad5ba7223f8d87179dfa23211d31845d47e07a474ac31ad5258afb606523c0d AS builder
ARG USER UID GROUP GID TARGETARCH UBUNTU_RELEASE CHISEL_VERSION
SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
RUN apt-get update \
Expand All @@ -21,7 +21,9 @@ RUN mkdir /rootfs \
base-files_release-info \
base-files_chisel \
ca-certificates_data \
aspnetcore-runtime-8.0_libs
aspnetcore-runtime-9.0_libs
RUN mv /rootfs/usr/lib/dotnet/dotnet9 /rootfs/usr/lib/dotnet/dotnet \
&& ln -s ../lib/dotnet/dotnet /rootfs/usr/bin/dotnet
RUN install -d -m 0755 -o "$UID" -g "$GID" "/rootfs/home/$USER" \
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG UBUNTU_RELEASE=24.04
ARG UBUNTU_RELEASE=24.10
ARG USER=app UID=101 GROUP=app GID=101
ARG CHISEL_VERSION=1.0.0

FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:da20fb875cfefd317c49e7aaf3998d3e5ad42c5b20f34a0eec6dca2fe4fbb8f4 AS builder
FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:fad5ba7223f8d87179dfa23211d31845d47e07a474ac31ad5258afb606523c0d AS builder
ARG USER UID GROUP GID TARGETARCH UBUNTU_RELEASE CHISEL_VERSION
SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
RUN apt-get update \
Expand All @@ -25,10 +25,12 @@ RUN chisel-wrapper --generate-dpkg-status /status -- --release "ubuntu-$UBUNTU_R
base-files_release-info \
base-files_chisel \
ca-certificates_data \
libbrotli1_libs \
libc6_libs \
libgcc-s1_libs \
libssl3t64_libs \
libstdc++6_libs \
libunwind8_libs \
zlib1g_libs

FROM scratch AS sbom-prep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG UBUNTU_RELEASE=24.04
ARG UBUNTU_RELEASE=24.10
ARG USER=app UID=101 GROUP=app GID=101
ARG CHISEL_VERSION=1.0.0

FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:da20fb875cfefd317c49e7aaf3998d3e5ad42c5b20f34a0eec6dca2fe4fbb8f4 AS builder
FROM ubuntu.azurecr.io/ubuntu:$UBUNTU_RELEASE@sha256:fad5ba7223f8d87179dfa23211d31845d47e07a474ac31ad5258afb606523c0d AS builder
ARG USER UID GROUP GID TARGETARCH UBUNTU_RELEASE CHISEL_VERSION
SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
RUN apt-get update \
Expand All @@ -21,7 +21,9 @@ RUN mkdir /rootfs \
base-files_release-info \
base-files_chisel \
ca-certificates_data \
dotnet-runtime-8.0_libs
dotnet-runtime-9.0_libs
RUN mv /rootfs/usr/lib/dotnet/dotnet9 /rootfs/usr/lib/dotnet/dotnet \
&& ln -s ../lib/dotnet/dotnet /rootfs/usr/bin/dotnet
RUN install -d -m 0755 -o "$UID" -g "$GID" "/rootfs/home/$USER" \
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dotnet-deps
version: 8.0
base: 24.04
version: 9.0
base: 24.10
platforms:
amd64:
arm64:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dotnet-runtime
version: 8.0
base: 24.04
version: 9.0
base: 24.10
platforms:
amd64:
arm64:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dotnet-aspnet
version: 8.0
base: 24.04
version: 9.0
base: 24.10
platforms:
amd64:
arm64:
Expand Down
2 changes: 1 addition & 1 deletion tests/app_helloworld-self-contained/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Running test for self-contained .NET Hello World app"
(cd src && dotnet publish --self-contained -r linux-x64)

RunContainer() {
docker run --rm -v $PWD/src:/app:ro --user $1 --entrypoint /app/bin/Release/net8.0/linux-x64/Hello $RUNTIME_DEPS_IMAGE
docker run --rm -v $PWD/src:/app:ro --user $1 --entrypoint /app/bin/Release/net9.0/linux-x64/Hello $RUNTIME_DEPS_IMAGE
}

RunContainer app
Expand Down
2 changes: 1 addition & 1 deletion tests/app_helloworld-self-contained/src/Hello.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/app_helloworld/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Running test for .NET Hello World app"
(cd src && dotnet publish --no-self-contained -r linux-x64)

RunContainer() {
docker run --rm -v $PWD/src:/app:ro --user $1 $RUNTIME_IMAGE /app/bin/Release/net8.0/linux-x64/Hello.dll
docker run --rm -v $PWD/src:/app:ro --user $1 $RUNTIME_IMAGE /app/bin/Release/net9.0/linux-x64/Hello.dll
}

RunContainer app
Expand Down
2 changes: 1 addition & 1 deletion tests/app_helloworld/src/Hello.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/app_https-client/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ echo "Running test for .NET HTTPS client app "

(cd src && dotnet publish --no-self-contained -r linux-x64)

docker run --rm -v $PWD/src:/app:ro $RUNTIME_IMAGE /app/bin/Release/net8.0/linux-x64/Hello.dll
docker run --rm -v $PWD/src:/app:ro $RUNTIME_IMAGE /app/bin/Release/net9.0/linux-x64/Hello.dll
2 changes: 1 addition & 1 deletion tests/app_https-client/src/Hello.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/web_helloworld/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Running test for ASP.NET Core app "
(cd src && dotnet publish --no-self-contained -r linux-x64)

RunContainer() {
docker run -d -p 8000:8080 --name web_helloworld -v $PWD/src:/app:ro --user $1 $ASPNET_IMAGE /app/bin/Release/net8.0/linux-x64/Hello.dll
docker run -d -p 8000:8080 --name web_helloworld -v $PWD/src:/app:ro --user $1 $ASPNET_IMAGE /app/bin/Release/net9.0/linux-x64/Hello.dll

# Allow time for web app to start
sleep 5
Expand Down
2 changes: 1 addition & 1 deletion tests/web_helloworld/src/Hello.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Loading