2021-11-01 16:42:52 -06:00
|
|
|
# base image
|
|
|
|
|
FROM node:13-buster
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
|
|
|
|
|
|
|
|
# install and cache app dependencies
|
|
|
|
|
COPY app/public /app/public
|
|
|
|
|
COPY app/src /app/src
|
|
|
|
|
COPY app/package.json /app/
|
2022-01-29 16:50:22 -07:00
|
|
|
RUN rm -rf /app/node_modules /app/package-lock.json
|
2021-11-01 16:42:52 -06:00
|
|
|
# Increase network timeout because a Raspberry Pi is slow.
|
2021-11-02 10:26:07 -06:00
|
|
|
RUN yarn --network-timeout 100000
|
2021-11-01 16:42:52 -06:00
|
|
|
|
|
|
|
|
# Create the production build
|
|
|
|
|
RUN yarn global add serve
|
|
|
|
|
|
|
|
|
|
# Run the production build
|
|
|
|
|
CMD ["serve", "-s", "build"]
|