11# Wine image for AMP containers based on Wine 10 stable
22# ghcr.io/cubecoders/amp:wine-10-stable
33
4- FROM --platform=linux/amd64 debian:bookworm-slim AS depsfinder
5-
6- ENV DEBIAN_FRONTEND="noninteractive"
7-
8- ARG WINE_DIST="bookworm"
9- ARG WINE_BRANCH="10-stable"
10-
11- COPY scripts/wine/find-deps.sh /usr/local/bin/find-deps.sh
12- RUN chmod +x /usr/local/bin/find-deps.sh
13-
14- RUN set -eux; \
15- dpkg --add-architecture i386; \
16- apt-get update; \
17- apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends \
18- ca-certificates curl wget gnupg xz-utils; \
19- install -d -m 0755 /etc/apt/keyrings; \
20- wget -qO- https://dl.winehq.org/wine-builds/winehq.key \
21- | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -; \
22- wget -NP /etc/apt/sources.list.d/ \
23- "https://dl.winehq.org/wine-builds/debian/dists/${WINE_DIST}/winehq-${WINE_DIST}.sources" ; \
24- apt-get update; \
25- \
26- mkdir -p /tmp/wine-files; \
27- /usr/local/bin/find-deps.sh "${WINE_BRANCH}" >"/tmp/wine-files/${WINE_BRANCH}.amd64.txt" ; \
28- cp /tmp/wine-files/${WINE_BRANCH}.amd64.txt /tmp/wine-files/wine-deps-amd64.txt
29-
30- FROM debian:bookworm-slim AS depsmapper
31-
32- ENV DEBIAN_FRONTEND="noninteractive"
33-
34- ARG TARGETARCH
35-
36- COPY --from=depsfinder /tmp/wine-files /tmp/wine-files
37-
38- COPY scripts/wine/map-x86-deps-to-arm.sh /usr/local/bin/map-x86-deps-to-arm.sh
39- RUN chmod +x /usr/local/bin/map-x86-deps-to-arm.sh
40-
41- # Generate dependencies list for arm64
42- RUN set -eux; \
43- if [ "${TARGETARCH}" = "arm64" ]; then \
44- /usr/local/bin/map-x86-deps-to-arm.sh \
45- < /tmp/wine-files/wine-deps-amd64.txt \
46- > /tmp/wine-files/wine-deps-arm64.txt; \
47- fi
48-
49- FROM ghcr.io/cubecoders/amp:debian
4+ FROM ghcr.io/cubecoders/amp:wine-common
505
516LABEL org.opencontainers.image.licenses=MIT
527
@@ -58,8 +13,6 @@ ARG WINE_BRANCH="stable"
5813ARG WINE_LINK="https://dl.winehq.org/wine-builds/debian/pool/main/w/wine/"
5914ARG WINE_TARGET="10"
6015
61- COPY --from=depsmapper /tmp/wine-files /tmp/wine-files
62-
6316# Install additional required packages and Wine 10 stable
6417RUN set -eux; \
6518 WINE_BUILD="$( \
@@ -70,9 +23,6 @@ RUN set -eux; \
7023 | sort -V | tail -1 \
7124 )" ; \
7225 \
73- apt-get update; \
74- apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends cabextract winbind python3; \
75- \
7626 case "${TARGETARCH}" in \
7727 \
7828 amd64) \
@@ -91,7 +41,7 @@ RUN set -eux; \
9141 \
9242 arm64) \
9343 apt-get update; \
94- xargs -ra /tmp/wine-files/wine-deps-arm64.txt \
44+ xargs -ra /tmp/wine-files/wine-${WINE_TARGET}-${WINE_BRANCH}- deps-arm64.txt \
9545 apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends; \
9646 \
9747 apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends \
0 commit comments