Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[experimental] amd64 image with Wine-wow64 #176

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 68 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,88 @@
FROM panard/wine:custom
MAINTAINER Panard <panard@backzone.net>
CMD mtgo

### build wine-wow64
FROM archlinux:latest as builder

RUN pacman -Syy && pacman -S --noconfirm base-devel curl

RUN useradd -d /home/user -m user
RUN echo 'user ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/user
RUN echo 'MAKEFLAGS="-j4"' >> /etc/makepkg.conf

USER user
WORKDIR /home/user

# 9.0-rc1
# https://aur.archlinux.org/packages/wine-wow64
# https://aur.archlinux.org/cgit/aur.git/commit/?h=wine-wow64
ARG AUR_TAG=5373213607fdc07dcadcc0e18f8ba09b90ae984c

RUN curl -fL https://aur.archlinux.org/cgit/aur.git/snapshot/aur-${AUR_TAG}.tar.gz | tar xzv\
&& mv aur-${AUR_TAG} wine-wow64

WORKDIR /home/user/wine-wow64

USER root
RUN pacman -Syy
USER user
RUN makepkg --syncdeps --noconfirm -o
RUN sed -i 's,$srcdir/$_name-$pkgver,$srcdir/$_name-$_pkgver,' PKGBUILD
RUN cat PKGBUILD; makepkg


###
### main image
###

FROM archlinux:latest
COPY --from=builder /home/user/wine-wow64/*.zst /tmp
CMD mtgo
ENV WINE_USER wine
ENV WINE_UID 1000
ENV WINEPREFIX /home/wine/.wine

RUN pacman -Syy && \
pacman -S --noconfirm \
cabextract \
libunwind \
libwbclient \
libxinerama \
libxcomposite \
&& pacman -Scc

RUN pacman -U --noconfirm \
/tmp/*.zst \
&& pacman -Scc

RUN useradd -u $WINE_UID -d /home/wine -m -s /bin/bash $WINE_USER

WORKDIR /home/wine

COPY extra/host-webbrowser /usr/local/bin/xdg-open
COPY extra/live-mtgo /usr/local/bin/live-mtgo

# Winetricks
ARG WINETRICKS_VERSION=master
ADD https://raw.githubusercontent.com/Winetricks/winetricks/$WINETRICKS_VERSION/src/winetricks /usr/local/bin/winetricks
ADD https://raw.githubusercontent.com/calheb/winetricks/e3d25a174d27ef5109803e597af2d65085755334/src/winetricks /usr/local/bin/winetricks
RUN chmod 755 /usr/local/bin/winetricks

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
cabextract \
winbind \
&& apt autoremove -y --purge \
&& apt clean -y && rm -rf /var/lib/apt/lists/*

RUN su - $WINE_USER -c 'wineboot -i' \
&& su - $WINE_USER -c 'winetricks -q corefonts calibri tahoma' \
&& su - $WINE_USER -c 'taskset -c 0 winetricks -f -q dotnet48' \
&& su - $WINE_USER -c 'winetricks win7 sound=alsa ddr=gdi'\
&& su - $WINE_USER -c 'winetricks renderer=gdi'\
&& su - $WINE_USER -c 'wineboot -s' \
ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet

USER wine
WORKDIR /home/wine
RUN wineboot -i \
&& for f in arial32 times32 trebuc32 verdan32; do \
curl -fL --output-dir /home/wine/.cache/winetricks/corefonts --create-dirs\
-O https://web.archive.org/web/20180219204401/https://mirrors.kernel.org/gentoo/distfiles/$f.exe; done\
&& winetricks -q corefonts calibri tahoma \
&& taskset -c 0 winetricks -q dotnet48 \
&& wineboot -s \
&& rm -rf /home/wine/.cache

ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet
RUN winetricks -q sound=alsa ddr=gdi renderer=gdi

COPY extra/mtgo.sh /usr/local/bin/mtgo
USER root

ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=7 /opt/mtgo/mtgo.exe
COPY extra/mtgo.sh /usr/local/bin/mtgo
ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=8 /opt/mtgo/mtgo.exe

USER wine

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

TIMESTAMP=$(shell date +%F)
TIMESTAMP=wow64

BASE=panard/mtgo:$(TIMESTAMP)

DOCKER=docker

image:
make -C docker-wine $(shell grep FROM Dockerfile|cut -d: -f2)
$(DOCKER) build -t $(BASE) .

test:
Expand Down
1 change: 0 additions & 1 deletion docker-wine/.gitignore

This file was deleted.

44 changes: 0 additions & 44 deletions docker-wine/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker-wine/Makefile

This file was deleted.

11 changes: 0 additions & 11 deletions docker-wine/debian/changelog

This file was deleted.

1 change: 0 additions & 1 deletion docker-wine/debian/compat

This file was deleted.

202 changes: 0 additions & 202 deletions docker-wine/debian/control

This file was deleted.

Loading