-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
37 lines (25 loc) · 901 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# syntax=docker/dockerfile:1.13
ARG node_version=22.13.1-alpine3.21
# common base for all stages
FROM node:${node_version} AS base
ENV CI=true
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
# create pruned source files
FROM base AS source
ARG turbo_version
WORKDIR /source
COPY --link package.json pnpm-*.yaml ./
RUN corepack enable && corepack install
COPY --link . .
RUN pnpx turbo@${turbo_version} prune e2e --docker
# final image
FROM mcr.microsoft.com/playwright:v1.50.0-jammy AS tester
WORKDIR /app
ENV CI=true
COPY --link --from=source /source/out/json/ .
# install dependencies
RUN corepack enable && pnpm install --frozen-lockfile
# add source
COPY --link --from=source /source/out/full/ .
CMD [ "pnpm", "run", "e2e", "--log-prefix=none" ]