-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
27 lines (24 loc) · 989 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
# syntax = docker/dockerfile:1
FROM node:23.3.0-slim AS dependencies
WORKDIR /usr/src/client
RUN --mount=type=cache,id=client:/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,id=client:/var/lib/apt/lists,target=/var/lib/apt/lists \
apt-get -y update && \
apt-get -y install \
git
COPY client/package.json client/yarn.lock client/.yarnrc.yml /usr/src/client/
RUN --mount=type=tmpfs,target=/tmp \
--mount=type=cache,id=client:/usr/local/share/.cache/yarn,target=/usr/local/share/.cache/yarn \
corepack enable && \
yarn
FROM dependencies AS dev
RUN --mount=type=cache,id=client:/usr/local/share/.cache/yarn,target=/mnt/yarn \
cp -r /mnt/yarn /usr/local/share/.cache/
FROM dependencies AS build
COPY . /usr/src/
RUN touch fonts/atlan.svg fonts/atlan.ttf fonts/atlan.woff && \
yarn build
FROM nginx:1.27.3
ENV HOMOCHECKER_API_HOST=homochecker-api
COPY client/conf/. /etc/nginx/templates/
COPY --from=build /usr/src/client/dist /var/www/html/