dev1/Dockerfile.common
2025-07-08 18:47:29 +00:00

21 lines
354 B
Docker

# ---------- minimal Node runtime ----------
FROM node:20-slim
# 1. safe work dir
WORKDIR /app
# 2. install prod deps only
COPY package*.json ./
RUN npm ci --omit=dev --ignore-scripts
# 3. copy source
COPY . .
# 4. expose port placeholder (overridden in child files)
ARG APPPORT=5000
ENV PORT=$APPPORT
EXPOSE $APPPORT
# 5. start
CMD ["npm","start"]