Skip to content

Guidance on running percy in node container (alpine) #727

Discussion options

You must be logged in to vote

Hopefully this helps.
Just adapt it to your needs.

Dockerfile

FROM node:lts-alpine

ENV PERCY_ENABLE=0 \
    PERCY_BROWSER_EXECUTABLE="/usr/bin/chromium-browser" \
    PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium-browser" \
    PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

RUN apk --update-cache add chromium
WORKDIR /app
COPY package.json yarn.lock .percy.json jest*.js ./
# Cache dependencies.
RUN ["yarn", "install", "--production", "--ignore-optional", "--frozen-lockfile"]
# Copy tests.
COPY --from=builder /app/build/ ./build/ <-- Copy your tests here.
ENTRYPOINT ["yarn", "percy", "exec", "--", "--", "yarn", "run", "exec"]

Build and run tests

docker build --tag styleguide-e2e-tests-alpine .
do…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gablittledevshop
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Robdel12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants