From 37f02957199f66074e2a416e0c57134c72342db5 Mon Sep 17 00:00:00 2001 From: kkosik Date: Tue, 29 Jul 2025 14:23:01 -0400 Subject: [PATCH 1/2] Update Dockerfile --- Dockerfile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40e9213..2339965 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,20 +2,25 @@ FROM suchja/wine USER root -# Update apt sources and install Go + Xvfb +# Update sources and install packages RUN sed -i 's|http://deb.debian.org|http://archive.debian.org|g' /etc/apt/sources.list && \ sed -i 's|http://security.debian.org|http://archive.debian.org|g' /etc/apt/sources.list && \ echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until && \ apt-get update && \ - apt-get install --allow-unauthenticated --force-yes -y golang xvfb + apt-get install --allow-unauthenticated --force-yes -y golang xvfb xauth x11-utils -# Copy source and build +# Copy app source COPY . /opt/say -RUN mkdir /opt/say/wavs && chmod 777 /opt/say/wavs -WORKDIR /opt/say +RUN mkdir -p /opt/say/wavs && chmod 777 /opt/say/wavs -# Build Go binary +# Build the Go app +WORKDIR /opt/say RUN go build -# Run with Xvfb wrapper -CMD ["xvfb-run", "-a", "/opt/say/say"] +# Add entrypoint script +COPY entrypoint.sh /opt/entrypoint.sh +RUN chmod +x /opt/entrypoint.sh + +# Set default command +ENTRYPOINT ["/opt/entrypoint.sh"] +CMD ["/opt/say/say"] From c273eaae107b28809896585c15fbea52ffb7414f Mon Sep 17 00:00:00 2001 From: kkosik Date: Tue, 29 Jul 2025 14:26:01 -0400 Subject: [PATCH 2/2] Create entrypoint.sh --- entrypoint.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..ce620e2 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Set up environment +export DISPLAY=:99 +XAUTHORITY=/home/xclient/.Xauthority +export XAUTHORITY + +# Create .Xauthority file +mkdir -p $(dirname $XAUTHORITY) +touch $XAUTHORITY +xauth add $DISPLAY . $(mcookie) + +# Start Xvfb in background +Xvfb $DISPLAY -screen 0 1024x768x16 & + +# Small delay to let Xvfb start +sleep 2 + +# Run the app +exec "$@"