Skip to content

Commit

Permalink
Bumping Node image. Added node user to audio, video groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
1Copenut committed Oct 12, 2023
1 parent 06b46b0 commit 5f8b874
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/docker-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zenato/docker-puppeteer/blob/master/Dockerfile

# >=12.0 required (for cypress). v18 is LTS.
FROM --platform=linux/amd64 node:18.18.0-slim
FROM --platform=linux/amd64 node:18.18.1-slim

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand All @@ -29,8 +29,13 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb

# Add directory for Cypress to write screenshots
RUN mkdir -p /cypress/screenshots && chown -R node:node /cypress
# Add node user to audio and video groups to enable Cypress video
# See https://wiki.debian.org/SystemGroups
# Add directory for Cypress to write screenshots and videos
RUN usermod -a -G audio,video node \
&& mkdir -p /cypress/screenshots \
&& mkdir -p /cypress/videos \
&& chown -R node:node /cypress

# Run as non-privileged node user for improved security
# See https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user
Expand Down

0 comments on commit 5f8b874

Please sign in to comment.