-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (32 loc) · 1.01 KB
/
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
39
40
41
FROM node:20.15-alpine as build
# https://github.com/docker/getting-started/issues/124
RUN apk add --no-cache python3 g++ make
COPY ./ app
WORKDIR /app
RUN apk --no-cache --virtual build-dependencies add \
python3 \
make \
g++
# For "canvas": https://stackoverflow.com/a/66692565/7309855
# canvas is onlye used in unit testing with monaco-editor.
# It should be possible to write pacakge.json to avoid installing canvas in production.
# But, I don't know how to do it.
RUN apk add --update --no-cache \
jpeg-dev \
cairo-dev \
giflib-dev \
pango-dev \
libtool \
autoconf \
automake
RUN yarn
COPY docker/env.local .env.local
RUN yarn build
# https://github.com/nginxinc/docker-nginx/tree/1.25.3
FROM nginx:1.25.3
RUN apt-get update && apt-get install -y jq
COPY --from=build /app/dist /app/dist
RUN mv docker-entrypoint.sh docker-entrypoint-base.sh
COPY docker/docker-entrypoint.sh .
COPY docker/docker-entrypoint.d/* /docker-entrypoint.d/
COPY docker/default.conf.template /etc/nginx/templates/