-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker/dockerfile:1.4
# Use the official Puppeteer image (includes all dependencies and Chromium)
FROM --platform=linux/amd64 ghcr.io/puppeteer/puppeteer:latest
# Switch to root to copy files and set permissions
USER root
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json (if present)
COPY package*.json ./
# Copy the rest of the application code
COPY . .
# Set ownership to pptruser
RUN chown -R pptruser:pptruser /app
RUN apt update && apt install -y chromium
# Switch to pptruser for npm install and running the app
USER pptruser
# Install dependencies (including puppeteer)
RUN npm install
# Expose port if your app runs a server (optional)
# EXPOSE 3000
# Default command (adjust as needed)
CMD ["npm", "start"]