Something went wrong. Try again.
An open-source, container-based Platform-as-a-Service (PAAS) for seamless deployments and effortless infrastructure management — built on f…
Something went wrong. Try again.
767 B · 35 lines
Dockerfile
at devops
1234567891011121314151617181920212223242526272829303132333435# Stage 1: Build StageFROM node:20-alpine AS build
# Set working directoryWORKDIR /home/app
# Install dependenciesCOPY package*.json ./RUN npm ci --only=production && npm cache clean --force
# Copy remaining files explicitlyCOPY ./entrypoint.sh ./server.js /home/app/
# Ensure scripts are executableRUN chmod +x /home/app/entrypoint.sh /home/app/server.js
# Stage 2: Runtime StageFROM alpine:latest
# Install necessary packagesRUN apk add --no-cache git nodejs npm
# Set working directoryWORKDIR /home/app
# Copy the built application from the build stageCOPY --from=build /home/app /home/app
# Ensure the entrypoint script is executableRUN chmod +x /home/app/entrypoint.sh /home/app/server.js
# Set the entrypointCMD ["sh", "./entrypoint.sh"]