`func init --docker` generates old version of Dockerfile for C# isolated
See original GitHub issueCustomers are reporting (and I’ve also verified) that func init --worker-runtime dotnet-isolated --docker
is generating what seems to be an older Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS installer-env
# Build requires 3.1 SDK
COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet
COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
mkdir -p /home/site/wwwroot && \
dotnet publish *.csproj --output /home/site/wwwroot
# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0-appservice
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
The in-process version uses the correct base image, but both still reference mcr.microsoft.com/dotnet/core/sdk:3.1
which I’m pretty sure is no longer supported.
This bug is affecting all customers using func.exe to generate Dockerfiles for their C# isolated worker process function apps.
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Isolated function using docker works in debug but not as a ...
Hi there, I am using .net7 rc2 preview and azure functions in isolated mode. When I debug them as a console app or...
Read more >Dockerfile reference
Dockerfile reference link Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains ......
Read more >Deprecated Engine Features
Docker API v1.42 and up now ignores this option when set. Older versions of the API continue to accept the option, but depending...
Read more >Create a base image - Docker Build
Most Dockerfiles start from a parent image. If you need to completely control the contents of your image, you might need to create...
Read more >docker build
The docker build command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please install the latest version which should be 4.0.5198.
Verified that 4.0.5.5198 fixes the issue. Thanks @khkh-ms I’ll update the container docs to note the func.exe version requirement.