picobook/Dockerfile

25 lines
579 B
Docker
Raw Normal View History

2023-10-29 19:28:07 +00:00
# Installs Node image
2024-03-31 13:49:09 -07:00
FROM node:18-buster as base
2023-10-29 19:28:07 +00:00
# sets the working directory for any RUN, CMD, COPY command
WORKDIR /app
2024-03-31 13:49:09 -07:00
# Install Python and pip
RUN apk add --update python3 py3-pip
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
2023-10-29 13:28:00 -07:00
2023-10-29 19:28:07 +00:00
# Copies stuff to cache for install
COPY ./package.json ./package-lock.json tsconfig.json ./
RUN echo "npm install"
RUN npm install
# Copies everything in the src directory to WORKDIR/src
COPY ./src ./src
COPY ./scripts ./scripts
# Run the server
RUN echo "npm run prod-start"
CMD ["npm", "run", "prod-start"]