-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (18 loc) · 574 Bytes
/
Dockerfile
File metadata and controls
32 lines (18 loc) · 574 Bytes
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
FROM mcr.microsoft.com/playwright
ENV NEXT_TELEMETRY_DISABLED=1
WORKDIR /app
COPY ["package.json", "yarn.lock", "./"]
RUN yarn install
COPY . .
RUN yarn build
RUN npm config set update-notifier false
ARG EXAMPLE_FOLDER
ENV EXAMPLE_FOLDER=$EXAMPLE_FOLDER
WORKDIR /app/examples/${EXAMPLE_FOLDER}
RUN yarn install
ARG INIT_COMMAND="start"
ENV INIT_COMMAND=$INIT_COMMAND
RUN test "$INIT_COMMAND" = "start" && yarn server & yarn build || exit 0
EXPOSE 3000
EXPOSE 7777
CMD ["/bin/sh", "-c", "yarn server & yarn $INIT_COMMAND & sleep 5 && cd /app && yarn test:e2e"]