2017-01-31 04:26:57 -05:00
|
|
|
# Pin the base image to a specific hash for maximum reproducibility.
|
2020-10-26 11:19:30 -04:00
|
|
|
# It will probably still work on newer images, though, unless an update
|
2017-01-31 04:26:57 -05:00
|
|
|
# changes some compiler optimisations (unlikely).
|
2023-11-07 07:47:12 -05:00
|
|
|
# bookworm-slim taken from https://hub.docker.com/_/debian/tags?page=1&name=bookworm-slim
|
2024-04-23 12:10:32 -04:00
|
|
|
FROM debian@sha256:3d5df92588469a4c503adbead0e4129ef3f88e223954011c2169073897547cac
|
2023-11-09 08:41:16 -05:00
|
|
|
# install remove default packages repository
|
2023-11-07 07:47:12 -05:00
|
|
|
RUN rm /etc/apt/sources.list.d/debian.sources
|
2023-04-18 05:46:45 -04:00
|
|
|
# and set the package source to a specific release too
|
2023-11-07 07:47:12 -05:00
|
|
|
# taken from https://snapshot.debian.org/archive/debian
|
2024-04-23 12:10:32 -04:00
|
|
|
RUN printf "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20240419T024211Z bookworm main\n" > /etc/apt/sources.list
|
2023-11-07 07:47:12 -05:00
|
|
|
# taken from https://snapshot.debian.org/archive/debian-security/
|
2024-04-23 12:10:32 -04:00
|
|
|
RUN printf "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20240419T111010Z bookworm-security main\n" >> /etc/apt/sources.list
|
2022-08-09 08:16:16 -04:00
|
|
|
|
2023-04-18 05:46:45 -04:00
|
|
|
RUN apt update && apt install --no-install-recommends --no-install-suggests -y wget ca-certificates git patch unzip bzip2 make gcc g++ libc-dev
|
2024-10-15 15:44:31 -04:00
|
|
|
RUN wget -O /usr/bin/opam https://github.com/ocaml/opam/releases/download/2.2.1/opam-2.2.1-i686-linux && chmod 755 /usr/bin/opam
|
2023-11-09 08:41:16 -05:00
|
|
|
# taken from https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
|
|
|
|
RUN test `sha512sum /usr/bin/opam | cut -d' ' -f1` = \
|
2024-10-15 15:44:31 -04:00
|
|
|
"bf16d573137835ce9abbcf6b99cb94a1da69ab58804a4de7c90233f0b354d5e68e9c47ee16670ca9d59866d58c7db345d9723e6eb5fc3a1cb8dca371f0e90225" || exit
|
2017-01-28 08:44:21 -05:00
|
|
|
|
2022-11-13 06:22:59 -05:00
|
|
|
ENV OPAMROOT=/tmp
|
|
|
|
ENV OPAMCONFIRMLEVEL=unsafe-yes
|
2017-01-28 08:44:21 -05:00
|
|
|
# Pin last known-good version for reproducible builds.
|
2017-01-31 04:26:57 -05:00
|
|
|
# Remove this line (and the base image pin above) if you want to test with the
|
|
|
|
# latest versions.
|
2023-11-07 07:47:12 -05:00
|
|
|
# taken from https://github.com/ocaml/opam-repository
|
2024-10-15 15:48:14 -04:00
|
|
|
RUN opam init --disable-sandboxing -a --bare https://github.com/ocaml/opam-repository.git#5d3f0d1d655199e596a1e785e69fae8fad78cad3
|
2024-05-09 06:58:52 -04:00
|
|
|
RUN opam switch create myswitch 4.14.2
|
2022-11-13 06:22:59 -05:00
|
|
|
RUN opam exec -- opam install -y mirage opam-monorepo ocaml-solo5
|
|
|
|
RUN mkdir /tmp/orb-build
|
|
|
|
ADD config.ml /tmp/orb-build/config.ml
|
|
|
|
WORKDIR /tmp/orb-build
|
2023-11-08 04:20:59 -05:00
|
|
|
CMD opam exec -- sh -exc 'mirage configure -t xen --extra-repos=\
|
2024-04-23 12:10:32 -04:00
|
|
|
opam-overlays:https://github.com/dune-universe/opam-overlays.git#4e75ee36715b27550d5bdb87686bb4ae4c9e89c4,\
|
|
|
|
mirage-overlays:https://github.com/dune-universe/mirage-opam-overlays.git#797cb363df3ff763c43c8fbec5cd44de2878757e \
|
|
|
|
&& make depend && make tar'
|