# Use lightweight Node.js Alpine image | |
FROM node:18-alpine | |
# Set working directory | |
WORKDIR /app | |
# Copy server file | |
COPY server.js . | |
# Expose port (default for HTTP) | |
EXPOSE 3000 | |
# Run the server | |
CMD ["node", "server.js"] |
# Use lightweight Node.js Alpine image | |
FROM node:18-alpine | |
# Set working directory | |
WORKDIR /app | |
# Copy server file | |
COPY server.js . | |
# Expose port (default for HTTP) | |
EXPOSE 3000 | |
# Run the server | |
CMD ["node", "server.js"] |