27 lines
553 B
Docker
27 lines
553 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
|
|
|
|
RUN apt-get install -y npm
|
|
|
|
# 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:dev"]
|