-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.dev
More file actions
38 lines (30 loc) · 1.38 KB
/
Copy pathDockerfile.dev
File metadata and controls
38 lines (30 loc) · 1.38 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
# Use the official ocaml/opam image: ships with a current opam (2.2+) and a
# pre-built OCaml 5.1 switch, avoiding the apt-shipped opam 2.1 which can't
# parse some current opam-repository entries.
FROM ocaml/opam:ubuntu-24.04-ocaml-5.6
USER root
ENV DEBIAN_FRONTEND=noninteractive \
OPAMYES=true \
OPAMJOBS=4
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential pkg-config m4 unzip rsync git curl ca-certificates sudo \
linux-tools-generic linux-tools-common \
valgrind \
google-perftools libgoogle-perftools-dev \
strace ltrace lsof procps numactl util-linux \
python3 python3-pip jq \
libgmp-dev libffi-dev libssl-dev zlib1g-dev libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*
# perf is shipped under linux-tools-<kernel>; expose a stable symlink.
RUN ln -sf "$(find /usr/lib/linux-tools -name perf | head -n1)" /usr/local/bin/perf || true
# Make the opam user able to use sudo for any container-side fixups.
RUN echo 'opam ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER opam
WORKDIR /home/opam
# Refresh the repo (the base image ships a snapshot) and install dev tools.
# ocamlformat is pinned to match the version in dune-project so `make fmt`
# inside the container produces the same output as CI.
RUN opam update -y \
&& opam install -y dune ocaml-lsp-server ocamlformat.0.27.0 utop
WORKDIR /workspace
CMD ["/bin/bash"]