Skip to content

[Feature]: Add additional tools to the published docker image / another imageΒ #2973

@MatMoore

Description

@MatMoore

πŸš€ Feature Request

I was wondering if you might be open to publishing a docker image that includes some of the following tools, in addition to playwright and the browsers:

  • npm
  • pipx
  • poetry

The mcr.microsoft.com/playwright/python:v1.54.0-noble image I tested with doesn't seem to have these, which got in the way of me being able to use it in Github Actions.

Example

I want to be use this image to run Playwright in a Github Actions workflow.

My job has

    container:
      image: 'mcr.microsoft.com/playwright/python:v${{needs.test.outputs.playwright-version}}-noble'
      options: --user 1001

Followed by

  • Installing poetry
  • Setting up python
  • Installing python and npm dependencies
  • Running pytest

But I haven't been able to get this to work.

This setup-python example of setting up python with a poetry cache doesn't work with this image, because pipx is not installed. It seems like to workaround this you either need to install pipx through pip or install poetry through pip. If you do the latter, you need to add /github/home/.local/bin to the path, because

npm not being available means I can't build the frontend of my app before running my tests.

Motivation

In my case, I thought using the official images would be a good idea to avoid very slow build times due to installing browsers when installing playwright myself (see microsoft/playwright#23388)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions