microservices/auth-service/Dockerfile

23 lines
503 B
Text
Raw Permalink Normal View History

2025-04-16 10:49:46 -07:00
# syntax=docker/dockerfile:1
# Use the official Node.js image as the base image
ARG NODE_VERSION=22.13.1
FROM node:${NODE_VERSION}-slim AS base
# Set the working directory
WORKDIR /app
2025-04-21 10:15:29 -07:00
COPY . .
RUN npm install
2025-04-16 10:49:46 -07:00
# Install dependencies using npm ci for deterministic builds
# RUN --mount=type=cache,target=/root/.npm npm ci --production
2025-04-16 10:49:46 -07:00
# Copy the application source code
COPY --link . .
# Expose the application port
EXPOSE 8080
# Define the command to run the application
CMD ["node", "server.js"]