GEEV2 / Dockerfile
Fred808's picture
Upload 2 files
7083cae verified
# syntax=docker/dockerfile:1
FROM debian:trixie-slim
ARG TARGETARCH
ARG VERSION_ARG="0.0"
ARG VERSION_VNC="1.6.0"
ARG DEBCONF_NOWARNINGS="yes"
ARG DEBIAN_FRONTEND="noninteractive"
ARG DEBCONF_NONINTERACTIVE_SEEN="true"
RUN set -eu && \
apt-get update && \
apt-get --no-install-recommends -y install \
bc \
jq \
xxd \
tini \
wget \
7zip \
curl \
ovmf \
fdisk \
nginx \
swtpm \
procps \
ethtool \
iptables \
iproute2 \
apt-utils \
dnsmasq \
xz-utils \
net-tools \
e2fsprogs \
qemu-utils \
iputils-ping \
genisoimage \
netcat-openbsd \
ca-certificates \
qemu-system-x86 && \
wget "https://github.com/qemus/passt/releases/download/v2025_09_19/passt_2025_09_19_${TARGETARCH}.deb" -O /tmp/passt.deb -q && \
dpkg -i /tmp/passt.deb && \
apt-get clean && \
mkdir -p /etc/qemu && \
echo "allow br0" > /etc/qemu/bridge.conf && \
mkdir -p /usr/share/novnc && \
wget "https://github.com/novnc/noVNC/archive/refs/heads/master.tar.gz" -O /tmp/novnc.tar.gz -q --timeout=10 && \
tar -xf /tmp/novnc.tar.gz -C /tmp/ && \
cd "/tmp/noVNC-master" && \
mv app core vendor package.json ./*.html /usr/share/novnc && \
unlink /etc/nginx/sites-enabled/default && \
sed -i 's/^worker_processes.*/worker_processes 1;/' /etc/nginx/nginx.conf && \
echo "$VERSION_ARG" > /run/version && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --chmod=755 ./src /run/
COPY --chmod=755 ./web /var/www/
COPY --chmod=664 ./web/conf/defaults.json /usr/share/novnc
COPY --chmod=664 ./web/conf/mandatory.json /usr/share/novnc
COPY --chmod=744 ./web/conf/nginx.conf /etc/nginx/default.conf
ADD --chmod=755 "https://github.com/qemus/fiano/releases/download/v1.2.0/utk_1.2.0_${TARGETARCH}.bin" /run/utk.bin
VOLUME /storage
EXPOSE 22 5900 8006
# Install sudo and set up permissions
RUN apt-get update && \
apt-get install -y sudo && \
mkdir -p /app /storage && \
chmod -R 777 /app /storage && \
useradd -m -u 1000 user && \
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
chown -R user:user /app /storage
# Keep root user for QEMU operations
# We'll use sudo in the entry script when needed
ENV BOOT="alpine"
ENV CPU_CORES="2"
ENV RAM_SIZE="2G"
ENV DISK_SIZE="64G"
ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]