-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.ci-debian
More file actions
69 lines (61 loc) · 2.16 KB
/
Dockerfile.ci-debian
File metadata and controls
69 lines (61 loc) · 2.16 KB
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
61
62
63
64
65
66
67
68
69
# Debian-based CI image for coverage builds
# Produces glibc binaries compatible with integration test containers
FROM debian:bookworm-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
opam \
build-essential \
git \
ca-certificates \
libgmp-dev \
libsqlite3-dev \
m4 \
pkg-config \
curl \
&& rm -rf /var/lib/apt/lists/*
# Initialize opam as root (GitHub Actions runs as root in containers)
RUN opam init --disable-sandboxing --bare -y && \
opam switch create 5.3.0 ocaml.5.3.0 -y
# Install OCaml dependencies
RUN eval $(opam env) && \
opam install -y \
dune \
ocamlformat \
cmdliner \
rresult \
yojson \
bos \
eio \
eio_main \
eio_posix \
cohttp-eio \
tls-eio \
tls \
ca-certs \
domain-name \
mirage-crypto-rng \
uri \
lambda-term \
linenoise \
ppx_deriving \
alcotest \
bisect_ppx \
sqlite3
# Install miaou packages (pre-pinned to avoid git cloning on every CI run)
# This saves ~2 minutes per build by having miaou already available
RUN eval $(opam env) && \
opam pin add miaou-core git+https://github.com/trilitech/miaou.git --no-action --yes && \
opam pin add miaou-driver-term git+https://github.com/trilitech/miaou.git --no-action --yes && \
opam pin add miaou-driver-matrix git+https://github.com/trilitech/miaou.git --no-action --yes && \
opam pin add miaou-driver-web git+https://github.com/trilitech/miaou.git --no-action --yes && \
opam pin add miaou-runner git+https://github.com/trilitech/miaou.git --no-action --yes && \
opam install -y miaou-core miaou-driver-term miaou-driver-matrix miaou-driver-web miaou-runner
# Clean up opam cache
RUN eval $(opam env) && opam clean -a -c -s --logs
# Set working directory
WORKDIR /workspace
# Set environment variables for opam
ENV OPAM_SWITCH_PREFIX=/root/.opam/5.3.0
ENV CAML_LD_LIBRARY_PATH=/root/.opam/5.3.0/lib/stublibs:/root/.opam/5.3.0/lib/ocaml/stublibs:/root/.opam/5.3.0/lib/ocaml
ENV OCAML_TOPLEVEL_PATH=/root/.opam/5.3.0/lib/toplevel
ENV PATH=/root/.opam/5.3.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin