1# build stage
2FROM node:lts-alpine as build-stage
3WORKDIR /app
4COPY package*.json ./
5RUN npm install
6COPY src ./src
7COPY public ./public
8COPY *.js .
9COPY .env* .
10COPY .eslint* .
11
12RUN npm run build
13
14# production stage
15FROM ubuntu:20.04 as production-stage
16RUN apt-get update && apt-get --no-install-recommends install -y python3.9 unzip xxd cgpt unzip openjdk-16-jre-headless zip less
17
18WORKDIR /app
19VOLUME [ "/app/target", "/app/output"]
20COPY otatools.zip .
21COPY --from=build-stage /app/dist ./dist
22COPY *.py .
23
24EXPOSE 8000
25CMD ["python3.9", "web_server.py"]