2022-08-22 21:30:18 +03:00
|
|
|
FROM node:18-bullseye-slim
|
2022-02-07 14:21:59 +03:00
|
|
|
|
2022-02-07 21:11:57 +03:00
|
|
|
RUN mkdir -p /usr/src/frontend
|
2022-02-07 14:21:59 +03:00
|
|
|
|
|
|
|
# specifying the working dir inside the container
|
2022-02-07 21:11:57 +03:00
|
|
|
WORKDIR /usr/src/frontend
|
2022-02-07 14:21:59 +03:00
|
|
|
|
2023-05-12 02:00:53 +03:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y python3 \
|
|
|
|
build-essential
|
|
|
|
|
2023-04-15 14:02:41 +03:00
|
|
|
# copy current workdir
|
2022-08-22 21:30:18 +03:00
|
|
|
COPY package.json package.json
|
|
|
|
COPY package-lock.json package-lock.json
|
2022-02-07 14:21:59 +03:00
|
|
|
|
2023-04-15 14:02:41 +03:00
|
|
|
# install packages
|
2022-09-13 20:10:20 +03:00
|
|
|
RUN npm install
|
2023-04-15 14:02:41 +03:00
|
|
|
RUN mv node_modules /tmp/node_modules
|
2022-02-07 14:21:59 +03:00
|
|
|
|
2023-05-17 12:27:19 +03:00
|
|
|
# copy entrypoint
|
|
|
|
COPY entrypoint.sh entrypoint.sh
|
|
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
|
2023-04-15 14:02:41 +03:00
|
|
|
ENTRYPOINT [ "/usr/src/frontend/entrypoint.sh" ]
|
2022-06-02 02:49:27 +03:00
|
|
|
CMD ["npm", "run", "build"]
|