-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (22 loc) · 841 Bytes
/
Dockerfile
File metadata and controls
34 lines (22 loc) · 841 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
FROM node:18.15.0 as builder
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV NODE_ENV=production
COPY package.json yarn.lock tsconfig.json ./
RUN npm install -g npm@9.6.4
RUN yarn install --frozen-lockfile
COPY . .
COPY config ./config
RUN yarn build
FROM node:18.15.0 as release
# RUN echo "deb http://deb.debian.org/debian jessie main\ndeb http://security.debian.org jessie/updates main" > /etc/apt/sources.list
RUN apt-get update && apt-get install netcat -y
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV NODE_ENV=production
COPY package.json yarn.lock tsconfig.json ./
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/dist ./dist
COPY --from=builder /usr/src/app/config/scripts ./config/scripts
RUN npm install -g npm@9.6.4
RUN yarn install --production --frozen-lockfile