Closed WeihanLi closed 3 years ago
we'll install in our program before use playwright.
Could you tell me how are you doing that?
Just call Playwrite.InstallAsync()
in Program.cs
or Startup.Configure
to install
You can remove that line of code and let dotnet build
do that for you. I think it's better to lose some time on build than on runtime.
It's not so friendly for docker build, the recommend dockerfile now is using multi-stage building,
the package installed during dotnet build
step is not necessary, and it will not copy to the runtime docker image, so the runtime image will still have to install the browser drivers, it means we have to install the drivers twice before we use it in docker environment
Wondering that if we could add some switch or parameter for install the drivers during build task?
If you use the official Docker image (https://github.com/microsoft/playwright-sharp/blob/a388277f82a1398348179000f737c983c03ff8cd/README.md#using-playwright-in-docker), that step in the build would just pass through.
I'm using a custom docker image on top of mcr.microsoft.com/dotnet/core/aspnet:3.1
There are some recipes here https://github.com/microsoft/playwright-sharp/issues/982
Oh, thanks
As the title, could we exclude the tool build task from the package?
Currently, we run our apps in docker container, when run
dotnet build
in the docker it'll cause the driver install, but we do not need to install the drivers when we build, we'll install in our program before use playwriteHope it can be removed, because it'll increase our docker build elapsed time, more worse when bad network