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