uptimekuma / Dockerfile
ChandimaPrabath's picture
Create Dockerfile
7ae7a2e verified
raw
history blame contribute delete
571 Bytes
# 1. Use Alpine Linux for a minimal builder image
FROM alpine AS builder
# 2. Install Node.js, npm, and git
RUN apk add --no-cache nodejs npm git
# 3. Create a non-root user for safety
RUN adduser -D app
USER app
# 4. Set working directory
WORKDIR /home/app
# 5. Clone Uptime Kuma repository
RUN git clone https://github.com/louislam/uptime-kuma.git
# 6. Install and build Uptime Kuma
WORKDIR /home/app/uptime-kuma
RUN npm run setup
# 7. Expose the port (must match app_port above)
EXPOSE 3001
# 8. Start the Uptime Kuma server
CMD ["node", "server/server.js"]