microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

How can I use Docker? #2814

Closed bbhxwl closed 9 months ago

bbhxwl commented 9 months ago

How should a dockerfile file be written? Continuously prompting that there is no permission and the RUN chmod command cannot be used, indicating that the chmod command does not exist. Is there an example?

mxschmitt commented 9 months ago

Playwright does not offer any special Docker integration, normal guides / onboardings still apply.

We only provide a Docker image which you can use which has all the system dependencies and browsers installed in order to use Playwright for .NET: https://playwright.dev/dotnet/docs/docker

There is no requirement that chmod is needed in order to use it. As an example see e.g. this:

FROM mcr.microsoft.com/playwright/dotnet:v1.40.0-jammy
ADD . /app
WORKDIR /app
RUN dotnet build && ./bin...

Closing as per above, we recommend e.g. StackOverflow or Docker docs for normal Docker support.