Skip to content

Commit

Permalink
Merge pull request #4 from mwaltonen/main
Browse files Browse the repository at this point in the history
Support for webkit/firefox with Playwright
  • Loading branch information
mmunz authored Aug 27, 2023
2 parents 15e177e + f6cba9e commit c1bb739
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions backstopBuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ ARG uid
ARG gid
RUN userdel -r node
RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd -l -m -s "/bin/bash" --gid "$username" --comment '' --uid $uid "$username" || useradd -l -m -s "/bin/bash" --gid "$username" --comment '' "$username" || useradd -l -m -s "/bin/bash" --gid "$gid" --comment '' "$username" || useradd -l -m -s "/bin/bash" --comment '' $username )
RUN echo "$username ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Add sudo and sudoers in manner similar to other ddev containers
RUN apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop

RUN npm install -g minimist
RUN npm install -g minimist && npm cache clean --force

# Install playwright browsers
RUN npx playwright install-deps && npm cache clean --force; apt clean -qq && rm -rf /var/lib/apt/lists/*
7 changes: 4 additions & 3 deletions docker-compose.backstop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ services:
build:
context: './backstopBuild'
args:
BASE_IMAGE: backstopjs/backstopjs:6.1.3
BASE_IMAGE: backstopjs/backstopjs:6.2.2
username: $USER
uid: $DDEV_GID
gid: $DDEV_UID
uid: $DDEV_UID
gid: $DDEV_GID
image: backstopjs/backstopjs:6.2.2-${DDEV_SITENAME}-built
user: '$DDEV_UID:$DDEV_GID'
# Add init to reap Chrome processes, as noted at
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker
Expand Down

0 comments on commit c1bb739

Please sign in to comment.