-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aarch64
54 lines (45 loc) · 1.37 KB
/
Dockerfile.aarch64
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
# syntax=docker/dockerfile:1
FROM debian:bookworm AS buildstage
ARG QEMU_VERSION
RUN \
echo "**** install build deps ****" && \
apt-get update && \
apt-get install -y \
curl \
xz-utils
RUN \
echo "**** ingest external assets ****" && \
mkdir -p \
/build-out/qemu \
/build-out/usr/bin \
/tmp/qemu && \
if [ -z "${QEMU_VERSION}" ]; then \
QEMU_VERSION=$(curl -sX GET https://deb.debian.org/debian/dists/bookworm-backports/main/binary-amd64/Packages.xz | xz -dc |grep -A 7 -m 2 'Package: qemu-user$' | awk -F ': ' '/Version/{print $2;exit}' | awk -F ':' '{print $2}'); \
fi && \
curl -o \
/tmp/qemu.deb -L \
"http://deb.debian.org/debian/pool/main/q/qemu/qemu-user_${QEMU_VERSION}_arm64.deb" && \
cd /tmp && \
dpkg-deb -R \
qemu.deb \
/tmp/qemu && \
cp \
/tmp/qemu/usr/bin/* \
/build-out/qemu && \
curl -o \
/build-out/usr/bin/qemu-binfmt-conf -L \
"https://raw.githubusercontent.com/qemu/qemu/refs/heads/master/scripts/qemu-binfmt-conf.sh" && \
chmod +x /build-out/usr/bin/qemu-binfmt-conf
# runtime stage
FROM alpine:latest
# set version label
ARG BUILD_DATE
ARG VERSION
ARG QEMU_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
# Add build assets
COPY --from=buildstage /build-out/ /
# add local files
COPY /root /
ENTRYPOINT ["/register"]