-
Notifications
You must be signed in to change notification settings - Fork 4
/
fedora_27.Dockerfile
163 lines (82 loc) · 4.04 KB
/
fedora_27.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
FROM vsiri/recipe:gosu as gosu
FROM fedora:27 as wine-staging
SHELL ["bash", "-euxvc"]
ARG WINE_VERSION=staging-1:2.4-3
RUN dnf install -y 'dnf-command(config-manager)'; \
dnf config-manager --add-repo https://repos.wine-staging.com/wine/fedora/24/winehq.repo; \
dnf remove -y 'dnf-command(config-manager)'; \
dnf install -y winehq-${WINE_VERSION}.x86_64; \
dnf clean all
# Font fun
RUN dnf install -y google-droid-sans-mono-fonts; \
dnf clean all
FROM wine-staging as wine-init
# Normal "Clean" docker rules do not apply here, no reason to keep image minimal
RUN dnf install -y xz; \
dnf clean all
ARG WINE_MONO_VERSION=4.7.1
ARG WINE_GECKO_VERSION=2.47
# The closest I could come to getting WINEPREFIX setup headless. I could use Xvfb
# if that was needed, but wine seems happy enough without it.
RUN export WINEPREFIX=/home/wine; \
mkdir -p /root/.cache/wine; \
pushd /root/.cache/wine; \
curl -LO http://dl.winehq.org/wine/wine-mono/${WINE_MONO_VERSION}/wine-mono-${WINE_MONO_VERSION}.msi; \
curl -LO http://dl.winehq.org/wine/wine-gecko/${WINE_GECKO_VERSION}/wine_gecko-${WINE_GECKO_VERSION}-x86.msi; \
curl -LO http://dl.winehq.org/wine/wine-gecko/${WINE_GECKO_VERSION}/wine_gecko-${WINE_GECKO_VERSION}-x86_64.msi; \
wineboot; \
wineserver -w; \
popd
# This differentiation is only useful for a breaking point when someone wants to
# gut the wine part of this docker and not the msys64 part
FROM wine-init as msys64-init
### Setup msys64
ARG MSYS2_VERSION=20160719
RUN export WINEPREFIX=/home/wine; \
cd /home/wine/drive_c; \
curl -L -o /tmp/msys2-base-x86_64-${MSYS2_VERSION}.tar.xz \
http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-${MSYS2_VERSION}.tar.xz; \
tar xf /tmp/msys2-base-x86_64-${MSYS2_VERSION}.tar.xz; \
# Create reg file
echo 'Windows Registry Editor Version 5.00' > /tmp/patch.reg; \
# Patch the font for mintty - Make Lucida Console use Droid Sans Mono
# https://www.codeweavers.com/support/forums/general?t=27;msg=191660
echo '[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]' >> /tmp/patch.reg; \
echo '"Lucida Console"="Droid Sans Mono"' >> /tmp/patch.reg; \
# Disable debug helper, instead of using winetricks noconsoledebug
echo '[HKEY_CURRENT_USER\Software\Wine\WineDbg]' >> /tmp/patch.reg; \
echo '"ShowCrashDialog"=dword:00000000' >> /tmp/patch.reg; \
# Enable Windows XP mode
echo '[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]' >> /tmp/patch.reg; \
echo '"CSDVersion"="Service Pack 2"' >> /tmp/patch.reg; \
echo '"CurrentBuildNumber"="3790"' >> /tmp/patch.reg; \
echo '"CurrentVersion"="5.2"' >> /tmp/patch.reg; \
echo '"ProductName"="Microsoft Windows XP"' >> /tmp/patch.reg; \
echo '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]' >> /tmp/patch.reg; \
echo '"CSDVersion"=dword:00000200' >> /tmp/patch.reg; \
# Enable Windows XP 32 mode just in case
echo '[HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion]' >> /tmp/patch.reg; \
echo '"CSDVersion"="Service Pack 2"' >> /tmp/patch.reg; \
echo '"CurrentBuildNumber"="3790"' >> /tmp/patch.reg; \
echo '"CurrentVersion"="5.2"' >> /tmp/patch.reg; \
echo '"ProductName"="Microsoft Windows XP"' >> /tmp/patch.reg; \
echo '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]' >> /tmp/patch.reg; \
echo '"CSDVersion"=dword:00000200' >> /tmp/patch.reg; \
WINEDEBUG=fixme-all wine64 regedit /tmp/patch.reg; \
wineserver -w
FROM wine-staging
LABEL maintainer="Andy Neff <[email protected]>"
COPY --from=gosu /usr/local/bin/gosu /usr/bin/gosu
COPY --from=msys64-init /home/wine /home/wine
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
TERM=xterm-256color \
WINPTY_SHOW_CONSOLE=1 \
MSYSTEM=MINGW64 \
MSYS2_WINE_WORKAROUND=1 \
CHERE_INVOKING=1
ADD wine_entrypoint.bsh /
RUN chmod 755 /wine_entrypoint.bsh
ENTRYPOINT ["/wine_entrypoint.bsh"]
CMD []