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

32 lines
608 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.
2025-06-02 16:48:44 +05:30
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 ./
2025-06-03 14:54:00 +05:30
RUN npm install --ignore-scripts && \
addgroup -S appgroup && \
2025-05-28 10:02:16 +05:30
adduser -S appuser -G appgroup && \
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"]