forked from Libertech-FR/mailrest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (30 loc) · 630 Bytes
/
Dockerfile
File metadata and controls
44 lines (30 loc) · 630 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
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:18.18.0-alpine AS builder
WORKDIR /usr/src/app
COPY . .
RUN apk add git && yarn install \
--prefer-offline \
--frozen-lockfile \
--non-interactive \
--production=false
RUN yarn run build
FROM node:18.18.0-alpine AS production
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /usr/src/app
ADD Makefile .
ADD package.json .
ADD *.lock .
RUN apk add --no-cache \
openssl \
git \
jq \
nano
RUN yarn install \
--prefer-offline \
--pure-lockfile \
--non-interactive \
--production=true
#COPY . .
COPY --from=builder /usr/src/app/dist ./dist
EXPOSE 7200
CMD ["yarn", "start:prod"]