Skip to content

Instantly share code, notes, and snippets.

@benjamin-kirkbride
Last active January 19, 2025 00:35
Show Gist options
  • Save benjamin-kirkbride/93c7e60ce83c7d552d2dec147e680fe7 to your computer and use it in GitHub Desktop.
Save benjamin-kirkbride/93c7e60ce83c7d552d2dec147e680fe7 to your computer and use it in GitHub Desktop.
Run UAssetGUI in Docker with Wine
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV WINEARCH=win64
ENV WINEPREFIX=/root/.wine
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/wine-stable/bin
# Install required packages
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
gnupg2 \
software-properties-common \
xvfb \
cabextract \
unzip
# Install Wine
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key && \
apt-key add winehq.key && \
add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ noble main' && \
apt-get update && \
apt-get install -y --install-recommends winehq-staging
# Install winetricks
RUN wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
chmod +x winetricks && \
mv winetricks /usr/local/bin
# Initialize Wine prefix
RUN wine wineboot --init && \
wineserver -w
# Install prefix dependencies
RUN winetricks -q micross && \
wineserver -w
# Download and install .NET Runtime
RUN wget https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe && \
xvfb-run -a -e /dev/stdout wine windowsdesktop-runtime-8.0.12-win-x64.exe /quiet && \
rm windowsdesktop-runtime-8.0.12-win-x64.exe
WORKDIR /app
RUN wget https://github.com/atenfyr/UAssetGUI/releases/download/v1.0.2/UAssetGUI.exe
RUN echo '#!/bin/bash\n\
echo "Starting application..."\n\
wine UAssetGUI.exe' > /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh
# assuming the image is called "uassetgui"
docker run -it --rm --network host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix uassetgui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment