Monorepo for Aesthetic.Computer
aesthetic.computer
1FROM debian:bullseye-slim
2
3# Install necessary dependencies for Chromium and fonts
4RUN apt-get update && apt-get install -y \
5 chromium \
6 fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
7 --no-install-recommends \
8 && rm -rf /var/lib/apt/lists/*
9
10# Create a non-root user to run Chromium
11RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
12 && mkdir -p /home/pptruser/Downloads \
13 && chown -R pptruser:pptruser /home/pptruser
14
15# Run as non-root user
16USER pptruser
17
18# Set working directory
19WORKDIR /home/pptruser
20
21# Expose the remote debugging port
22EXPOSE 9222
23
24# Command to run Chromium
25# --no-sandbox and --disable-setuid-sandbox are often needed in containerized environments
26# --disable-dev-shm-usage is recommended to prevent issues with /dev/shm size
27# --user-data-dir is set to a writable temporary location
28CMD ["chromium", \
29 "--headless", \
30 "--disable-gpu", \
31 "--remote-debugging-port=9222", \
32 "--remote-debugging-address=0.0.0.0", \
33 "--no-sandbox", \
34 "--disable-setuid-sandbox", \
35 "--disable-dev-shm-usage", \
36 "--user-data-dir=/tmp/chromium-user-data" \
37 ]