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