-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (34 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
41 lines (34 loc) · 1.48 KB
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
33
34
35
36
37
38
39
40
41
# Use a base image with X11 and VNC support
FROM jlesage/baseimage-gui:alpine-3.19-v4
# Docker image version is provided via build arg
ARG DOCKER_IMAGE_VERSION=
# Installs latest Chromium package and socat for port forwarding
# Note: socat is used to forward external connections to Chromium's internal debugging port
# This is necessary because Chromium in this environment doesn't properly accept external
# connections when directly binding to 0.0.0.0
RUN apk upgrade --no-cache --available \
&& apk add --no-cache \
curl \
socat \
chromium-swiftshader \
ttf-freefont \
font-noto-emoji \
&& apk add --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
font-wqy-zenhei
# Copy font configuration for better rendering
COPY local.conf /etc/fonts/local.conf
# Set environment variables
ENV CHROME_CUSTOM_ARGS="--no-first-run --password-store=basic --no-sandbox --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage --disable-accelerated-2d-canvas --disable-webgl --hide-scrollbars"
ENV KEEP_APP_RUNNING=1
ENV VNC_RESOLUTION="1920x1080"
ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROME_PATH=/usr/lib/chromium/
# Create necessary directories for user data and configurations with proper permissions
RUN mkdir -p /config/userdata /config/cache && \
chmod -R 777 /config
# Add the startup script
COPY startapp.sh /startapp.sh
RUN chmod +x /startapp.sh
# Expose necessary ports for VNC and the web interface
EXPOSE 5900 5800 9222