-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
148 lines (122 loc) · 4.53 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
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
FROM --platform=arm64 python:slim-bullseye as box64_m1
ENV DEBIAN_FRONTEND noninteractive
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
git \
ca-certificates \
build-essential \
cmake \
&& git clone https://github.com/ptitSeb/box64.git \
&& mkdir /box64/build \
&& cd /box64/build \
&& cmake .. -D M1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j$(nproc) \
&& make install DESTDIR=/tmp/install
############################################################
FROM --platform=arm64 python:slim-bullseye as box64_rpi5
ENV DEBIAN_FRONTEND noninteractive
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
git \
ca-certificates \
build-essential \
cmake \
&& git clone https://github.com/ptitSeb/box64.git \
&& mkdir /box64/build \
&& cd /box64/build \
&& cmake .. -D RPI5ARM64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j$(nproc) \
&& make install DESTDIR=/tmp/install
############################################################
FROM --platform=arm64 python:slim-bullseye as box64_adlink
ENV DEBIAN_FRONTEND noninteractive
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
git \
ca-certificates \
build-essential \
cmake \
&& git clone https://github.com/ptitSeb/box64.git \
&& mkdir /box64/build \
&& cd /box64/build \
&& cmake .. -D ADLINK=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j$(nproc) \
&& make install DESTDIR=/tmp/install
############################################################
# Dockerfile that contains Depot Downloader and Box86/64
############################################################
FROM debian:bullseye-slim as build_stage_amd64
ARG TARGETARCH
ARG DEPOT_DOWNLOADER_VERSION="2.6.0"
LABEL maintainer="github@snry.me"
ENV DEBIAN_FRONTEND noninteractive
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
openssl \
ca-certificates \
nano \
curl \
locales \
wget \
gnupg \
libicu67 \
unzip \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& rm -rf /var/lib/apt/lists/* \
&& case "${TARGETARCH}" in \
"amd64") DEPOT_DOWNLOADER_FILENAME=DepotDownloader-linux-x64.zip ;; \
"arm64") DEPOT_DOWNLOADER_FILENAME=DepotDownloader-linux-arm64.zip ;; \
esac \
&& wget --progress=dot:giga "https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_${DEPOT_DOWNLOADER_VERSION}/${DEPOT_DOWNLOADER_FILENAME}" -O DepotDownloader.zip \
&& unzip DepotDownloader.zip \
&& rm -rf DepotDownloader.xml \
&& chmod +x DepotDownloader \
&& mv DepotDownloader /usr/local/bin/DepotDownloader
FROM --platform=arm64 build_stage_amd64 as build_stage_arm64
COPY --from=box64_m1 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-m1
COPY --from=box64_rpi5 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-rpi5
COPY --from=box64_adlink /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-adlink
# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
&& dpkg --add-architecture armhf \
&& dpkg --add-architecture i386 \
&& wget --progress=dot:giga https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list \
&& (wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg) \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
libc6:i386 \
libc6:armhf \
libcurl4 \
libcurl4:i386 \
libnuma1 \
libnuma1:i386 \
libglib2.0-0 \
libglib2.0-0:i386 \
box64 \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& rm -rf /var/lib/apt/lists/* \
&& mv /usr/local/bin/box64 /usr/local/bin/box64-generic
COPY box64.sh /usr/local/bin/box64
RUN chmod +x /usr/local/bin/box64
ARG TARGETARCH
FROM build_stage_${TARGETARCH} AS bullseye