Skip to content

Commit

Permalink
Dotnet 9 Isolated AzureLinux 3 Image (#1193)
Browse files Browse the repository at this point in the history
* Dotnet 9 Isolated AzureLinux 3 Image

* Address comments

* address comments

---------

Co-authored-by: Manikanta Nallagatla <[email protected]>
manikantanallagatla and Manikanta Nallagatla authored Jan 23, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 4944e52 commit 3c9f905
Showing 4 changed files with 66 additions and 0 deletions.
4 changes: 4 additions & 0 deletions host/4/dotnet-isolated-build.yml
Original file line number Diff line number Diff line change
@@ -83,6 +83,10 @@ jobs:
dotnetVersion: "dotnet9-isolated"
dockerfilePath: "host/4/bookworm/dotnet-isolated/dotnet9-isolated/"
dockerImageName: "-dotnet-isolated9.0"
_isolated-net-9-azurelinux3:
dotnetVersion: "dotnet9-isolated-azurelinux3"
dockerfilePath: "host/4/mariner/dotnet-isolated/"
dockerImageName: "-dotnet-isolated9.0-azurelinux3"

steps:
- bash: |
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Build the runtime from source
ARG HOST_VERSION=4.1037.0
FROM mcr.microsoft.com/dotnet/sdk:8.0-azurelinux3.0 AS sdk-image
ARG HOST_VERSION
ENV PublishWithAspNetCoreTargetManifest=false

RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \
git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \
cd /src/azure-functions-host && \
HOST_COMMIT=$(git rev-list -1 HEAD) && \
dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 --self-contained && \
mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \
rm -rf /root/.local /root/.nuget /src

# Include ASP.NET Core shared framework from dotnet/aspnet image.
FROM mcr.microsoft.com/dotnet/aspnet:9.0-azurelinux3.0 AS aspnet9

FROM mcr.microsoft.com/dotnet/runtime:9.0-azurelinux3.0
ARG HOST_VERSION


ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
HOME=/home \
FUNCTIONS_WORKER_RUNTIME=dotnet-isolated \
DOTNET_USE_POLLING_FILE_WATCHER=true \
HOST_VERSION=${HOST_VERSION} \
ASPNETCORE_CONTENTROOT=/azure-functions-host \
AzureWebJobsFeatureFlags=EnableWorkerIndexing \
ASPNETCORE_URLS=http://+:80

RUN curl -O https://packages.microsoft.com/azurelinux/3.0/prod/base/x86_64/Packages/g/glibc-devel-2.38-8.azl3.x86_64.rpm
RUN tdnf install -y glibc-devel-2.38-8.azl3.x86_64.rpm


COPY --from=sdk-image [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=aspnet9 [ "/usr/share/dotnet", "/usr/share/dotnet" ]

CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]
12 changes: 12 additions & 0 deletions host/4/publish.yml
Original file line number Diff line number Diff line change
@@ -239,6 +239,18 @@ jobs:
docker system prune -a -f
displayName: tag and push dotnet8-isolated mariner images
continueOnError: false
- bash: |
set -e
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3
docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3 $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated9.0-azurelinux3
docker push $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3
docker system prune -a -f
displayName: tag and push dotnet9-isolated azurelinux3 images
continueOnError: false
- job: Java
steps:
12 changes: 12 additions & 0 deletions host/4/republish.yml
Original file line number Diff line number Diff line change
@@ -207,6 +207,18 @@ jobs:
docker system prune -a -f
displayName: tag and push dotnet8-isolated mariner images
continueOnError: false
- bash: |
set -e
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3
docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3 $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated9.0-azurelinux3
docker push $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated9.0-azurelinux3
docker system prune -a -f
displayName: tag and push dotnet9-isolated azurelinux3 images
continueOnError: false
- job: Java
steps:

0 comments on commit 3c9f905

Please sign in to comment.