Files
avbroot/tests/distros/Containerfile.arch-wine
2023-05-23 15:27:20 -04:00

56 lines
2.0 KiB
Docker

FROM docker.io/archlinux/archlinux:latest
RUN pacman --noconfirm -Syu --needed aria2 xorg-server-xvfb \
&& yes | pacman -Scc
# Yep, we're installing Windows msys2 packages directly on top of Arch
ARG KEYRING_VERSION=1~20230316-1
ARG KEYRING_SHA256=eb672d0d41b2e857f97f0d9de6d3325113c992c5c1a9aab4bd468341e5471572
RUN aria2c https://mirror.msys2.org/msys/x86_64/msys2-keyring-${KEYRING_VERSION}-any.pkg.tar.zst \
--checksum SHA-256=${KEYRING_SHA256} \
&& pacman --noconfirm -U msys2-keyring-${KEYRING_VERSION}-any.pkg.tar.zst \
&& rm msys2-keyring-${KEYRING_VERSION}-any.pkg.tar.zst
COPY wine/pacman.additional.conf /tmp/
RUN cat /tmp/pacman.additional.conf >> /etc/pacman.conf \
&& pacman-key --init \
&& pacman-key --populate \
&& rm /tmp/pacman.additional.conf
RUN pacman --noconfirm -Sy \
mingw-w64-x86_64-ca-certificates \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-python \
mingw-w64-x86_64-python-lz4 \
mingw-w64-x86_64-python-pip \
mingw-w64-x86_64-python-protobuf \
mingw-w64-x86_64-zlib \
wine \
wine-mono \
&& yes | pacman -Scc
# Since binfmt_misc can't work in an unprivileged container, all post-install
# .exe executions failed, including the ones for setting up the trusted CA
# certificates. Run the post install script using the Linux version of p11-kit
# so we don't have to create a wine prefix (see below).
RUN cat /var/lib/pacman/local/mingw-w64-x86_64-ca-certificates-*/install \
| sed 's,[^ ]*/\([^ ]\+\).exe,\1,g; $a post_install' \
| bash -s
COPY --chmod=755 wine/python3.sh /usr/local/bin/python3
# msys2 does not have strictyaml in its repos
run WINEDLLOVERRIDES=winemenubuilder.exe=d \
WINEPREFIX=/tmp/wine \
python3 -m pip install strictyaml \
&& rm -rf /tmp/wine
# We don't precreate a wine prefix because openssl fails to gather entropy when
# using a persisted wine prefix for some reason. It doesn't seem to actually be
# caused by the lack of entropy.
ENTRYPOINT ["xvfb-run"]
CMD ["bash"]