-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathDockerfile.build_from_source
79 lines (58 loc) · 1.85 KB
/
Dockerfile.build_from_source
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
# Build Wine from source in builder container
# See https://wiki.winehq.org/Building_Wine
ARG IMAGE_TAG=latest
FROM ubuntu:$IMAGE_TAG as build-config
ENV DEBIAN_FRONTEND="noninteractive"
RUN sed -i -E 's/^# deb-src /deb-src /g' /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y git \
&& apt-get build-dep -y wine
RUN mkdir -p /wine-dirs/wine-build \
&& git clone --depth=1 --shallow-submodules git://source.winehq.org/git/wine.git /wine-dirs/wine-source
ENV CC=clang
ENV CXX=clang
ENV CFLAGS="-I/usr/local/include"
ENV LDFLAGS="-L/usr/local/lib"
WORKDIR /wine-dirs/wine-build
RUN ../wine-source/configure
FROM build-config AS builder
RUN make -j "$(nproc)"
RUN mkdir -p /wine-dirs/wine-install \
&& make install DESTDIR=/wine-dirs/wine-install
FROM scottyhardy/docker-remote-desktop:latest as main-base
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
cabextract \
git \
gosu \
gpg-agent \
locales \
p7zip \
pulseaudio \
pulseaudio-utils \
sudo \
tzdata \
unzip \
wget \
winbind \
xvfb \
zenity \
&& rm -rf /var/lib/apt/lists/*
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
COPY pulse-client.conf /root/pulse/client.conf
COPY entrypoint.sh /usr/bin/entrypoint
# Checkpoint builds are used in CI to circumvent 6hr time-out on Github workflow jobs
FROM build-config AS ci-builder
COPY entrypoint_ci_builder.sh /usr/bin/entrypoint
ENTRYPOINT ["/usr/bin/entrypoint"]
# Final image for CI
FROM main-base as ci-final
COPY wine-build/wine-install/ /
ENTRYPOINT ["/usr/bin/entrypoint"]
# Build the final image
FROM main-base
COPY --from=builder /wine-dirs/wine-install/ /
ENTRYPOINT ["/usr/bin/entrypoint"]