github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/containers/compilers/mirage/ocaml/Dockerfile.xen (about) 1 FROM ubuntu:18.04 2 3 RUN apt-get install -y wget &&\ 4 wget -O bubblewrap.deb http://lug.mtu.edu/ubuntu/pool/main/b/bubblewrap/bubblewrap_0.3.1-2_amd64.deb &&\ 5 dpkg -i bubblewrap.deb &&\ 6 wget -O /usr/local/bin/opam https://github.com/ocaml/opam/releases/download/2.0.1/opam-2.0.1-x86_64-linux &&\ 7 chmod a+x /usr/local/bin/opam &&\ 8 yes '' | opam init --disable-sandboxing --reinit -y && yes '' | opam switch create 4.06.0 &&\ 9 cd /tmp/ &&\ 10 yes '' | opam source fat-filesystem --dir ocaml-fat &&\ 11 cd /tmp/ocaml-fat &&\ 12 yes '' | opam pin add fat-filesystem . -n -y &&\ 13 yes '' | opam install fat-filesystem --verbose -y 14 15 # result of "opam config env"" 16 ENV CAML_LD_LIBRARY_PATH="/home/opam/.opam/system/lib/stublibs:/usr/lib/ocaml/stublibs" 17 ENV MANPATH="/home/opam/.opam/system/man:" 18 ENV PERL5LIB="/home/opam/.opam/system/lib/perl5" 19 ENV OCAML_TOPLEVEL_PATH="/home/opam/.opam/system/lib/toplevel" 20 ENV PATH="/home/opam/.opam/system/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 21 22 # build a sample app to make sure nothing's broken, and install fat volume tools. 23 RUN cd /tmp && \ 24 git clone https://github.com/mirage/mirage-skeleton && \ 25 cd mirage-skeleton/static_website && \ 26 /home/opam/.opam/system/bin/mirage configure -t xen --kv_ro fat --net direct --dhcp true --network=0 27 28 VOLUME /opt/code 29 WORKDIR /opt/code