mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-11 06:33:32 +00:00
35 lines
1.2 KiB
Docker
35 lines
1.2 KiB
Docker
FROM ocaml/opam:alpine-3.5_ocaml-4.04.0
|
|
RUN cd /home/opam/opam-repository && git pull && opam update -u
|
|
|
|
# to be able to use cstruct.ppx + jbuilder
|
|
RUN opam pin add cstruct 2.4.0 -n
|
|
# to bring eth0 up
|
|
RUN opam pin add tuntap 1.0.0 -n
|
|
RUN opam pin add mirage-net-fd --dev -n
|
|
|
|
RUN opam depext -iy mirage-net-unix logs-syslog irmin-unix cohttp decompress
|
|
RUN opam depext -iy rawlink tuntap jbuilder irmin-watcher inotify rresult
|
|
|
|
# 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 list
|
|
|
|
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
|