wrolpi/docker/app/Dockerfile

19 lines
437 B
Docker

# 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/
RUN rm -rf /app/node_modules
# Increase network timeout because a Raspberry Pi is slow.
RUN yarn --network-timeout 100000
# Create the production build
RUN yarn global add serve
# Run the production build
CMD ["serve", "-s", "build"]