Files
Dwinzo-Backend-V0.0/src/api-server/Dockerfile

33 lines
595 B
Docker
Raw Normal View History

2025-01-30 12:44:04 +05:30
ARG NODE_VERSION=lts
FROM node:${NODE_VERSION}-alpine AS development
# Use production node environment by default.
ENV NODE_ENV=development
2025-01-30 12:44:04 +05:30
WORKDIR /usr/src/app
RUN npm install -g tsx --ignore-scripts
2025-01-30 12:44:04 +05:30
COPY package.json ./
COPY package-lock.json ./
RUN npm install --ignore-scripts
2025-01-30 12:44:04 +05:30
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
RUN chown -R appuser:appgroup /usr/src/app
2025-01-30 12:44:04 +05:30
# Switch to non-root user
USER appuser
2025-01-30 12:44:04 +05:30
COPY . .
# Expose the port that the application listens on.
EXPOSE 3503
# Run the application.
2025-01-22 16:59:14 +05:30
CMD ["npm", "run", "start:api"]