New and learning Dockerfile; need help to edit the following Dockerfile to containerize a C# Azure Function App with Playwright.
This is the Dockerfile (with line numbers)
1. FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated6.0 AS base
2. WORKDIR /home/site/wwwroot
3. EXPOSE 80
4.
5. FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
6. ARG BUILD_CONFIGURATION=Release
7. WORKDIR /src
8. COPY . .
9. RUN ls -la
10. RUN dotnet restore "./Func_MyFunction.csproj"
11. RUN dotnet add package Microsoft.Playwright
12. RUN dotnet build "./Func_MyFunction.csproj" -c $BUILD_CONFIGURATION -o /app/build
13. RUN playwright install
14.
15. FROM build AS publish
16. ARG BUILD_CONFIGURATION=Release
17.
18. RUN dotnet publish "./Func_MyFunction.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
19.
20. FROM base AS final
21. WORKDIR /home/site/wwwroot
22. COPY --from=publish /app/publish .
23. ENV AzureWebJobsScriptRoot=/home/site/wwwroot
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
This is the error:
#14 [build 8/8] RUN playwright install
#14 0.415 /bin/sh: 1: playwright: not found
#14 ERROR: process "/bin/sh -c playwright install" did not complete successfully: exit code: 127
------
> [build 8/8] RUN playwright install:
0.415 /bin/sh: 1: playwright: not found
------
Dockerfile:16
--------------------
14 | RUN dotnet add package Microsoft.Playwright
15 | RUN dotnet build "./Func_MyFunction.csproj" -c $BUILD_CONFIGURATION -o /app/build
16 | >>> RUN playwright install
17 |
18 | FROM build AS publish
--------------------
ERROR: failed to solve: process "/bin/sh -c playwright install" did not complete successfully: exit code: 127
Thank you in advance!