Skip to content

Commit

Permalink
First attempt at Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomhmpereira committed Oct 18, 2024
1 parent 0ff5337 commit 5ab515f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ARG BASE_OS=ubuntu:24.04
FROM ${BASE_OS}

ENV BASE=/home/smtml \
DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get install -y \
curl \
git \
sudo \
python3-pip \
unzip \
rsync \
mercurial \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN echo "/usr/local/bin" | bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)" \
pip install --break-system-packages --upgrade pip setuptools

RUN useradd -m -s /bin/bash smtml \
&& echo "smtml ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

USER smtml
WORKDIR ${BASE}

RUN opam init --disable-sandboxing --shell-setup -y \
&& opam switch create -y z3-bitwuzla 5.2.0 \
&& eval $(opam env --switch=z3-bitwuzla) \
&& opam update \
&& opam install -y dune \
&& echo "eval \$(opam env --switch=z3-bitwuzla)" >> ~/.bash_profile

RUN opam switch create -y cvc5 5.2.0 \
&& eval $(opam env --switch=cvc5) \
&& opam update \
&& opam install -y dune \
&& echo "eval \$(opam env --switch=cvc5)" >> ~/.bash_profile

RUN opam switch create -y colibri2 5.2.0 \
&& eval $(opam env --switch=colibri2) \
&& opam update \
&& opam install -y dune \
&& echo "eval \$(opam env --switch=colibri2)" >> ~/.bash_profile

RUN git clone https://github.com/formalsec/smtml.git ${BASE}/smtml

WORKDIR ${BASE}/smtml

RUN eval $(opam env --switch=z3-bitwuzla) \
&& sudo apt update \
&& opam install -y . --deps-only --confirm-level=unsafe-yes \
&& dune build \
&& dune install

0 comments on commit 5ab515f

Please sign in to comment.