gwei-alert-bot/Dockerfile

23 lines
530 B
Docker
Raw Normal View History

2023-04-17 21:49:20 -04:00
FROM node:18-slim as ts-compiler
WORKDIR /usr/app
COPY package*.json ./
COPY tsconfig*.json ./
2023-04-18 18:51:16 -04:00
RUN apt update \
&& apt install build-essential python3 -y
2023-04-17 21:49:20 -04:00
RUN npm install
COPY . ./
RUN npm run build
FROM node:18-slim as ts-remover
WORKDIR /usr/app
COPY --from=ts-compiler /usr/app/package*.json ./
COPY --from=ts-compiler /usr/app/dist ./
2023-04-18 18:51:16 -04:00
RUN apt update \
&& apt install build-essential python3 -y
2023-04-17 21:49:20 -04:00
RUN npm install --omit=dev
FROM node:18-slim
WORKDIR /usr/app
COPY --from=ts-remover /usr/app ./
COPY .env ./
CMD node index.js