~sircmpwn/builds.sr.ht

builds.sr.ht/images/qemu/Dockerfile -rw-r--r-- 1.5 KiB
48fa5794Dhruvin Gandhi alpine: run setup-timezone conditionally 11 days ago
                                                                                
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 debian:unstable

RUN apt-get -y update --fix-missing && apt-get -y upgrade && apt-get install -y \
    build-essential pkg-config curl xz-utils

RUN curl -O https://download.qemu.org/qemu-7.0.0.tar.xz \
    && tar xvf qemu-7.0.0.tar.xz

RUN apt-get install -y \
    libaio-dev \
    libcap-dev \
    libcap-ng-dev \
    liblzo2-dev \
    texinfo \
    vde2 \
    zlib1g-dev \
    libpixman-1-dev \
    libglib2.0-dev \
    ninja-build

RUN cd qemu-7.0.0 && ./configure \
    --prefix=/ \
    --bindir=/bin \
    --datadir=/share \
    --includedir=/include \
    --libdir=/lib \
    --libexecdir=/libexec \
    --mandir=/share/man \
    --static \
    --python=/usr/bin/python3 \
    --audio-drv-list="" \
    --disable-docs \
    --disable-debug-info \
    --disable-opengl \
    --disable-virglrenderer \
    --disable-vte \
    --disable-gtk \
    --disable-sdl \
    --disable-spice \
    --disable-vnc \
    --disable-curses \
    --disable-xen \
    --disable-smartcard \
    --disable-libnfs \
    --disable-libusb \
    --disable-glusterfs \
    --disable-tools \
    --disable-werror \
    --target-list="x86_64-softmmu,i386-softmmu,aarch64-softmmu,arm-softmmu,ppc64-softmmu,s390x-softmmu,riscv64-softmmu,mips-softmmu,mipsel-softmmu,mips64el-softmmu"

RUN cd qemu-7.0.0 && make && make install

FROM scratch
COPY --from=0 /bin/qemu-system-* /bin/
COPY --from=0 /share/qemu/ /share/qemu/

COPY --from=0 /lib/x86_64-linux-gnu/libnss_dns*.so* /lib/x86_64-linux-gnu/
COPY --from=0 /etc/nsswitch.conf /etc/

CMD ["/bin/qemu-system-x86_64"]