Created
October 31, 2023 20:09
-
-
Save matthewgream/3165c206b557d36c3e58045a1fa74a90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stable-slim | |
############################################################################################################ | |
ARG BUILD_DATE | |
LABEL maintainer="https://gfic.limited" | |
LABEL org.label-schema.schema-version="1.0" | |
LABEL org.label-schema.build-date=$BUILD_DATE | |
LABEL org.label-schema.name="wine64" | |
LABEL org.label-schema.description="wine64" | |
LABEL org.label-schema.url="https://gfic.limited" | |
WORKDIR /tmp/ | |
############################################################################################################ | |
ARG APP_EXPENDABLE="apt-transport-https wget gnupg2" | |
ARG APP_RETAINABLE="curl winbind ca-certificates procps openbox tigervnc-standalone-server" | |
RUN set -ex; \ | |
dpkg --add-architecture i386 && \ | |
DEBIAN_FRONTEND=noninteractive apt-get update -y && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${APP_EXPENDABLE} ${APP_RETAINABLE} | |
############################################################################################################ | |
ARG WINE_REL="stable" | |
RUN set -ex; \ | |
\ | |
wget -nv -O- https://dl.winehq.org/wine-builds/winehq.key | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - && \ | |
echo "deb https://dl.winehq.org/wine-builds/debian/ $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2) main" >> /etc/apt/sources.list && \ | |
dpkg --add-architecture i386 && \ | |
DEBIAN_FRONTEND=noninteractive apt-get update -y && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends winehq-${WINE_REL} && \ | |
\ | |
[ ! -d /usr/share/wine/gecko ] && mkdir -p /usr/share/wine/gecko && \ | |
WINE_VER=$(wine --version | sed -E 's/^wine-//') && \ | |
GAPP_SRC="https://raw.githubusercontent.com/wine-mirror/wine/wine-${WINE_VER}/dlls/appwiz.cpl/addons.c" && \ | |
GAPP_VER=$(wget -q -O- $GAPP_SRC | grep -E "^#define GECKO_VERSION\s" | awk -F\" '{print $2}') && \ | |
GAPP_URL="http://dl.winehq.org/wine/wine-gecko/${GAPP_VER}/" && \ | |
for FILE in $(wget -q -O- $GAPP_URL | sed -E "s/></>\n</g" | sed -n -E "s|^.*<a href=\"(.*\.msi)\">.*|\1|p" | uniq); do \ | |
wget -nv -O "/usr/share/wine/gecko/${FILE}" "${GAPP_URL}${FILE}"; \ | |
done && \ | |
ls -l /usr/share/wine/gecko | |
############################################################################################################ | |
RUN DEBIAN_FRONTEND=noninteractive apt-get clean -y && \ | |
rm -rf /tmp/* /var/tmp/* /var/lib/apt/* /var/cache/apt/* && \ | |
dpkg -l | |
############################################################################################################ | |
ARG UID=1000 | |
ARG USER=wine | |
ARG HOME=/home/$USER | |
ENV USER=$USER | |
ENV HOME=$HOME | |
ENV TZ=UTC | |
RUN set -ex; \ | |
groupadd $USER && \ | |
useradd -u $UID -d $HOME -g $USER -ms /bin/bash $USER | |
ENV DISPLAY=:1 | |
ENV DISPLAY_SIZ=1366x768 \ | |
DISPLAY_DEP=24 \ | |
DISPLAY_PWD=/usr/local/etc/vnc.passwd \ | |
DISPLAY_PRT=5900 | |
EXPOSE 5900 | |
ENV WINEPREFIX=$HOME/.wine \ | |
WINEARCH="win64" | |
USER $USER | |
RUN set -ex; \ | |
wine wineboot --init && \ | |
while pgrep wineserver > /dev/null; do sleep 5; done | |
############################################################################################################ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment