docker-unipi/Dockerfile

17 lines
762 B
Docker
Raw Normal View History

2022-07-23 08:31:07 +00:00
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14 AS opam
2022-09-09 10:02:26 +00:00
RUN sudo cp /usr/bin/opam-2.1 /usr/local/bin/opam
2022-09-09 16:46:26 +00:00
RUN sudo apt update && ( cd opam-repository && git pull origin master ) && opam update && \
2022-09-09 10:02:26 +00:00
opam install 'mirage>4' && \
eval $(opam env) && \
git clone https://github.com/roburio/unipi.git && \
( cd unipi && git checkout effective-path && mirage configure -t spt && make ) && \
2022-09-09 10:02:26 +00:00
{ bindir="$(opam var bin)"; cp $bindir/solo5-elftool $bindir/solo5-spt ~/; }
2022-07-23 08:31:07 +00:00
FROM ubuntu:20.04
2022-09-09 10:02:26 +00:00
COPY --from=opam /home/opam/unipi/dist/unipi.spt /unipi.spt
COPY --from=opam /home/opam/solo5-elftool /home/opam/solo5-spt /usr/local/bin/
2022-07-23 08:31:07 +00:00
COPY entrypoint.sh /entrypoint.sh
RUN apt update && apt install -y iproute2
2022-07-23 09:24:12 +00:00
EXPOSE 80
2022-07-23 08:31:07 +00:00
ENTRYPOINT ["/entrypoint.sh", "/unipi.spt"]