31 lines
615 B
Docker
31 lines
615 B
Docker
# Use a Node.js base image
|
|
FROM node:18
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install required system libraries for ImageMagick
|
|
RUN apt-get update && apt-get install -y \
|
|
imagemagick \
|
|
ghostscript \
|
|
libheif1 \
|
|
libheif-dev \
|
|
libde265-0 \
|
|
libvips-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
|
|
# Install npm dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application code
|
|
COPY . .
|
|
|
|
# Expose port 5000
|
|
EXPOSE 5000
|
|
|
|
# Command to run the application
|
|
CMD [ "npm", "start" ]
|