-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (51 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
66 lines (51 loc) · 1.19 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM node:22-bookworm-slim AS builder
ENV TIMEZONE=Europe/Paris \
LANGUAGE=fr_FR.UTF-8 \
LANG=fr_FR.UTF-8 \
TERM=xterm \
DEBIAN_FRONTEND=noninteractive
WORKDIR /data
COPY . .
RUN yarn install \
--prefer-offline \
--frozen-lockfile \
--non-interactive \
--production=false
RUN yarn run build
FROM node:22-bookworm-slim AS production
ENV TIMEZONE=Europe/Paris \
LANGUAGE=fr_FR.UTF-8 \
LANG=fr_FR.UTF-8 \
TERM=xterm \
DEBIAN_FRONTEND=noninteractive
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /data
ADD package.json .
ADD *.lock .
RUN apt clean -y \
&& apt update -y \
# && apt upgrade -y \
&& apt install -y locales \
&& export LANGUAGE=${LANGUAGE} \
&& export LANG=${LANG} \
&& export LC_ALL=${LC_ALL} \
&& locale-gen ${LANG} \
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
&& apt install --no-install-recommends -yq \
procps \
git \
jq \
nano \
openssl
RUN yarn install \
--prefer-offline \
--pure-lockfile \
--non-interactive \
--production=true
# && yarn cache clean \
# && yarn autoclean --init \
# && yarn autoclean --force
RUN npm i -g pkg
COPY --from=builder /data/dist ./dist
CMD ["yarn", "run", "start:prod"]