crawling-and-serving/Dockerfile
2023-04-18 20:57:18 +03:00

25 lines
526 B
Docker

FROM ubuntu:20.04 AS base
# Set non-interactive mode
ENV DEBIAN_FRONTEND noninteractive
ENV NODE_ENV=production
# 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"]