docker: Use a stable snapshot for Debian Sid
[qemu.git] / tests / docker / dockerfiles / debian-sid.docker
blob4e4cda0ba5e9219b27fd99cec270c3343fba5e5f
2 # Debian Sid Base
4 # A number of our guests exist as ports only. We can either use the
5 # ports repo or get everything from Sid. However Sid is a rolling
6 # distro which may be broken at any particular time. If you are
7 # unlucky and try and build your images while gcc is in the process of
8 # being uploaded this can fail. Your only recourse is to try again in
9 # a few hours when the repos have re-synced. Once built however you
10 # won't be affected by repo changes unless the docker recipies are
11 # updated and trigger a re-build.
14 FROM debian:sid-slim
16 # Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
17 ENV DEBIAN_SNAPSHOT_DATE "20181030"
18 RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
20 # Duplicate deb line as deb-src
21 RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
23 # Install common build utilities
24 RUN apt update
25 RUN DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
26 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
27     apt install -y --no-install-recommends \
28         bison \
29         build-essential \
30         ca-certificates \
31         flex \
32         git \
33         pkg-config \
34         psmisc \
35         python \
36         texinfo || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }