-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
Dockerfile
38 lines (23 loc) · 638 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
38
#syntax=docker/dockerfile:1.4
# Versions
FROM node:20-bookworm AS node_upstream
# Base stage for dev and build
FROM node_upstream AS base
WORKDIR /srv/app
RUN corepack enable && \
corepack prepare --activate yarn@*
ENV HOSTNAME localhost
EXPOSE 3000
ENV PORT 3000
COPY --link package.json yarn.lock .yarnrc.yml ./
RUN set -eux; \
yarn && yarn cache clean
# copy sources
COPY --link . ./
RUN set -eux; \
yarn playwright install --with-deps && yarn cache clean
# Development image
FROM base as dev
CMD ["sh", "-c", "yarn storybook"]
FROM base as ci
CMD ["sh", "-c", "yarn storybook:build && yarn storybook:serve -p 3000"]