-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.image
60 lines (50 loc) · 1.53 KB
/
Dockerfile.image
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
FROM viryaos/sdk-qemu-user-aarch64:v3.7-45f9eeb-x86_64 AS sdk-qemu-user-aarch64
FROM dom0-builder-package AS dom0-builder-package
FROM viryaos-xen-package-boot AS viryaos-xen-package-boot
FROM viryaos-grub-package as viryaos-grub-package
FROM arm64v8/alpine:3.7
COPY --from=sdk-qemu-user-aarch64 /home/builder/sdk-qemu-user-aarch64/qemu-aarch64 /usr/bin/qemu-aarch64
COPY --from=sdk-qemu-user-aarch64 /home/builder/sdk-qemu-user-aarch64/qemu-aarch64 /usr/bin/qemu-aarch64-static
COPY [ \
"./docker-extras/*", \
"/tmp/docker-build/" \
]
COPY ./viryaos.dtb /home/builder/viryaos.dtb
RUN \
# Add root to abuild group. This is required because we cannot su into user
# builder.
addgroup root abuild && \
# apk
apk update && \
\
apk add \
abuild \
alpine-baselayout \
alpine-conf \
device-mapper \
dosfstools \
e2fsprogs \
gcc \
mkinitfs \
mtools \
multipath-tools \
sgdisk \
squashfs-tools \
sudo \
util-linux \
vim && \
\
# mtools
echo "mtools_skip_check=1" >> /etc/mtools.conf && \
\
# Copy vos_run file
cp /tmp/docker-build/vos_run /vos_run && \
chmod 755 /vos_run && \
\
# cleanup
cd /root && \
rm -rf /tmp/* && \
rm -f /var/cache/apk/*
COPY --from=dom0-builder-package /home/builder/output-dom0-builder/ /home/builder/output-dom0-builder/
COPY --from=viryaos-xen-package-boot /home/builder/output-viryaos-xen-boot/ /home/builder/output-viryaos-xen-boot/
COPY --from=viryaos-grub-package /home/builder/output-viryaos-grub/ /home/builder/output-viryaos-grub/