0
0
docker-images/dockerfiles/hckrnws.Dockerfile
Opnxng bbbd56ea8b
All checks were successful
hckrnws / build (push) Successful in 2m52s
Hckrnws: updated Dockerfile
2024-10-13 01:46:15 +08:00

27 lines
565 B
Docker
Executable File

# Use the official Node.js image
FROM node:lts-slim
# Set the working directory in the container
WORKDIR /app
# Copy package.json and pnpm-lock.yaml for installing dependencies
COPY package.json pnpm-lock.yaml ./
# Install pnpm
RUN npm install -g pnpm
# Install project dependencies
RUN pnpm install --frozen-lockfile
# Copy the rest of the application code
COPY . .
# Build the application for production
RUN pnpm run build
# Expose the port
EXPOSE 3000
# Command to run the application in production
CMD ["pnpm", "run", "start"]