# Simple Node.js Dockerfile FROM node:18-alpine WORKDIR /usr/src/app # Install dependencies (use package-lock.json if present) COPY src ./ RUN npm install --only=production # Use a non-root user for safety RUN addgroup -S app && adduser -S -G app app USER app EXPOSE 3000 ENV NODE_ENV=production # Start the app (change to ["npm","start"] if you use an npm script) CMD ["node", "main.js"]