mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-08 16:52:13 +00:00
Expose a non-unix dependent flow-like API, so it is easier to test/use in a unikernel. Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
Docker
FROM ocaml/opam:alpine-3.5_ocaml-4.04.0
|
|
RUN git -C /home/opam/opam-repository pull origin master && opam update -u
|
|
|
|
RUN opam info mirage-net-fd
|
|
|
|
RUN opam depext -iy mirage-net-unix logs-syslog irmin-unix cohttp decompress
|
|
RUN opam depext -iy rawlink tuntap.1.0.0 jbuilder irmin-watcher inotify
|
|
RUN opam install rresult
|
|
RUN opam pin add tuntap 1.0.0
|
|
|
|
# TMP: to compile the calf
|
|
RUN opam pin add -n charrua-client https://github.com/yomimono/charrua-client.git#state-halfway
|
|
RUN opam depext -uiy ocamlfind topkg-care ocamlbuild lwt mirage-types-lwt mirage
|
|
RUN opam depext -uiy charrua-client cohttp conduit mirage-unix
|
|
RUN opam depext -uiy mirage-net-fd ptime mirage-logs
|
|
|
|
RUN sudo mkdir -p /src
|
|
COPY ./sdk /src/sdk
|
|
COPY ./dhcp-client /src/dhcp-client
|
|
RUN sudo chown opam -R /src
|
|
|
|
USER opam
|
|
WORKDIR /src
|
|
|
|
RUN opam config exec -- jbuilder build dhcp-client/main.exe
|
|
RUN sudo cp /src/_build/default/dhcp-client/main.exe /dhcp-client
|
|
|
|
RUN opam config exec -- jbuilder build dhcp-client/calf/unikernel.exe
|
|
RUN sudo mkdir -p /calf
|
|
RUN sudo cp /src/_build/default/dhcp-client/calf/unikernel.exe /calf/dhcp-client-calf
|