crawling-and-serving/Dockerfile

26 lines
526 B
Docker
Raw Normal View History

2023-04-18 12:54:49 +00:00
FROM ubuntu:20.04 AS base
# Set non-interactive mode
ENV DEBIAN_FRONTEND noninteractive
2023-04-18 14:35:49 +00:00
ENV NODE_ENV=production
2023-04-18 12:54:49 +00:00
# Install required packages
RUN apt-get update && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y nodejs chromium-browser
# Set the working directory
WORKDIR /app
# Copy the package.json and package-lock.json files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the source code
COPY . .
# Start the application
CMD ["npm", "run", "start:prod"]