forked from guillaumebo/innosetup-docker
-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
72 lines (56 loc) · 2.09 KB
/
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
FROM amake/wine:buster AS inno
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends procps xvfb \
&& rm -rf /var/lib/apt/lists/*
# get at least error information from wine
ENV WINEDEBUG=-all,err+all
# Run virtual X buffer on this port
ENV DISPLAY=:99
COPY opt /opt
ENV PATH=$PATH:/opt/bin
USER xclient
# InnoSetup ignores dotfiles if they are considered hidden, so set
# ShowDotFiles=Y. But the registry file is written to disk asynchronously, so
# wait for it to be updated before proceeding; see
# https://github.com/amake/innosetup-docker/issues/6
RUN wine reg add 'HKEY_CURRENT_USER\Software\Wine' /v ShowDotFiles /d Y \
&& while [ ! -f /home/xclient/.wine/user.reg ]; do sleep 1; done
# Install Inno Setup binaries
RUN curl -SL "https://files.jrsoftware.org/is/6/innosetup-6.3.3.exe" -o is.exe \
&& wine-x11-run wine is.exe /SP- /VERYSILENT /ALLUSERS /SUPPRESSMSGBOXES /DOWNLOADISCRYPT=1 \
&& rm is.exe
# Install unofficial languages
RUN cd "/home/xclient/.wine/drive_c/Program Files/Inno Setup 6/Languages" \
&& curl -L "https://api.github.com/repos/jrsoftware/issrc/tarball/is-6_3_3" \
| tar xz --strip-components=4 --wildcards "*/Files/Languages/Unofficial/*.isl"
FROM debian:buster-slim
RUN addgroup --system xusers \
&& adduser \
--home /home/xclient \
--disabled-password \
--shell /bin/bash \
--gecos "user for running an xclient application" \
--ingroup xusers \
--quiet \
xclient
# Install some tools required for creating the image
# Install wine and related packages
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
wine \
wine32 \
osslsigncode \
&& rm -rf /var/lib/apt/lists/*
COPY opt /opt
ENV PATH=$PATH:/opt/bin
COPY --chown=xclient:xusers --from=inno /home/xclient/.wine /home/xclient/.wine
RUN mkdir /work && chown xclient:xusers -R /work
# Wine really doesn't like to be run as root, so let's use a non-root user
USER xclient
ENV HOME=/home/xclient
ENV WINEPREFIX=/home/xclient/.wine
ENV WINEARCH=win32
WORKDIR /work
ENTRYPOINT ["iscc"]