21 lines
534 B
Docker
21 lines
534 B
Docker
FROM node:20.19-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy application dependency manifests to the container image.
|
|
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
|
|
# Copying this first prevents re-running npm install on every code change.
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN yarn install --registry https://registry.npmmirror.com/ --ignore-engines
|
|
|
|
# Copy the rest of the application files to the container image.
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN yarn run build
|
|
|
|
EXPOSE 3302
|
|
|
|
CMD ["npm", "start"] |