forked from rems-project/cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.devcontainer
More file actions
32 lines (26 loc) · 1.05 KB
/
Dockerfile.devcontainer
File metadata and controls
32 lines (26 loc) · 1.05 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
# Build an image suitable for use as a VSCode dev container for CN development.
FROM ubuntu:24.04
# Install system packages
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y opam libgmp-dev libmpfr-dev software-properties-common
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main"
RUN add-apt-repository "deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main"
RUN apt-get update
RUN apt-get install -y clang-format-19
RUN ln -s /usr/bin/clang-format-19 /usr/bin/clang-format
ENV OPAMCONFIRMLEVEL=unsafe-yes
RUN opam init --disable-sandboxing
ADD . /opt/cerberus
WORKDIR /opt/cerberus
RUN opam install --deps-only ./cn.opam
RUN opam install z3
RUN opam install ocaml-lsp-server ocamlformat
RUN eval `opam env`
WORKDIR /opt
COPY docker_entry_point.sh /opt/docker_entry_point.sh
RUN chmod +x /opt/docker_entry_point.sh
RUN echo "source /opt/docker_entry_point.sh" >> /root/.bashrc
WORKDIR /data
ENTRYPOINT ["/opt/docker_entry_point.sh"]