-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dotnet 8 Isolated Mariner Image (#1027)
* Update dockerfile * Fix host version and docker commands * Temporarily enable glibc-devel installation * Update dockerfile * Fix host version and docker commands * Temporarily enable glibc-devel installation * Add file * Add dotnet8 isolated dockerfile * Update dockerfile * Fix host version and docker commands * Temporarily enable glibc-devel installation * Add file * Add dotnet8 isolated dockerfile * Fix host version and docker commands * Temporarily enable glibc-devel installation * modify republish file * Modify publish.yml * merge complete * Temporary todo * update dotnet-build.yml * Update image file names * Expose correct port * Update dotnet-build.yml
- Loading branch information
Showing
5 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
host/4/mariner/dotnet/dotnet-isolated/dotnet8-isolated-mariner.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Build the runtime from source | ||
ARG HOST_VERSION=4.29.1 | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.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:8.0-cbl-mariner2.0 AS aspnet8 | ||
|
||
FROM mcr.microsoft.com/dotnet/runtime:8.0-cbl-mariner2.0 | ||
ARG HOST_VERSION | ||
|
||
RUN yum install -y dnf | ||
|
||
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 | ||
|
||
# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 | ||
RUN dnf install -y glibc-devel | ||
|
||
COPY --from=sdk-image [ "/azure-functions-host", "/azure-functions-host" ] | ||
COPY --from=aspnet8 [ "/usr/share/dotnet", "/usr/share/dotnet" ] | ||
|
||
CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters