Skip to content

Commit 12ddc9b

Browse files
committed
Reduce the image size of the build image
Since we now upload this to the registry try somewhat to reduce the layer sizes.
1 parent 70ba792 commit 12ddc9b

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

build-base/Dockerfile

+17-18
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@ FROM debian:bookworm AS build
22

33
# Install WINE build dependencies
44
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources
5-
RUN apt update
6-
RUN DEBIAN_FRONTEND="noninteractive" apt-get build-dep --install-recommends -y wine
7-
# debian does not pull in i686 mingw (needed for building "experimental wow64" support)
8-
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y gcc-mingw-w64-i686
9-
10-
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y git
5+
RUN apt update && \
6+
DEBIAN_FRONTEND="noninteractive" apt-get build-dep --install-recommends -y wine && \
7+
# debian does not pull in i686 mingw (needed for building "experimental wow64" support)
8+
DEBIAN_FRONTEND="noninteractive" apt-get install -y gcc-mingw-w64-i686 && \
9+
DEBIAN_FRONTEND="noninteractive" apt-get install -y git && \
10+
rm -rf /var/lib/apt/lists/*
1111

1212
# Build and install patched WINE (see https://github.com/msys2/MSYS2-packages/issues/682)
13-
RUN git clone https://gitlab.winehq.org/jhol/wine.git /tmp/winesrc
14-
WORKDIR /tmp/winesrc
15-
# https://gitlab.winehq.org/jhol/wine/-/commits/msys2-hacks-17
16-
RUN git checkout aed38b3fea259c23738d60df67d562592d394393
17-
RUN ./configure --disable-tests --enable-win64 --with-mingw --enable-archs=x86_64,i386
18-
RUN make -j $(nproc)
19-
RUN env DESTDIR=/wine make -j $(nproc) install
20-
RUN rm -rf /tmp/winesrc
21-
22-
# Clean things up
23-
RUN find /wine -type f -exec strip --strip-all {} \;
24-
RUN rm -Rf /wine/usr/local/include
13+
RUN git clone --filter=tree:0 https://gitlab.winehq.org/jhol/wine.git /tmp/winesrc && \
14+
cd /tmp/winesrc && \
15+
# https://gitlab.winehq.org/jhol/wine/-/commits/msys2-hacks-17
16+
git checkout aed38b3fea259c23738d60df67d562592d394393 && \
17+
./configure --disable-tests --enable-win64 --with-mingw --enable-archs=x86_64,i386 && \
18+
make -j $(nproc) && \
19+
env DESTDIR=/wine make -j $(nproc) install && \
20+
rm -rf /tmp/winesrc && \
21+
# Clean things up
22+
find /wine -type f -exec strip --strip-all {} \; && \
23+
rm -Rf /wine/usr/local/include

msys2/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ghcr.io/msys2/msys2-docker-build-base AS build
22

33
# Install MSYS2
4-
RUN apt install -y zstd curl
4+
RUN apt update && apt install -y zstd curl
55
RUN mkdir -p /tmp/msys64
66
RUN curl --fail -L 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.tar.zst' | tar -x --zstd -C /tmp/
77

0 commit comments

Comments
 (0)