Skip to content

Instantly share code, notes, and snippets.

@kayceesrk
Created October 6, 2016 08:00
Show Gist options
  • Save kayceesrk/d22c19ba3293c4d1cf29bb56e9551d8c to your computer and use it in GitHub Desktop.
Save kayceesrk/d22c19ba3293c4d1cf29bb56e9551d8c to your computer and use it in GitHub Desktop.
## Docker file for OCaml with GDB support
#
# Build
# -----
# $ mkdir monda-docker
# $ cp <this_file> monda-docker/
# $ docker build --force-rm=true -t monda .
# ..takes a while..
#
# Run
# ---
# $ docker run --privileged -it monda
# opam@f9c741c51b06:~$ ocamlopt -g <some_file>.ml
# opam@f9c741c51b06:~$ gdb-ocaml a.out
FROM ocaml/opam:debian
#Editors
RUN sudo apt-get update
RUN sudo apt-get -y install vim emacs
#OCaml tools
RUN sudo -u opam sh -c "opam depext -u merlin utop tuareg" && \
sudo -u opam sh -c "opam install -y -j 2 -v merlin utop tuareg"
## OCaml with GDB
RUN sudo apt-get -y install gdb binutils-dev texinfo flex bison
RUN opam remote add monda -k git https://github.com/mshinwell/opam-repo-dev && \
opam switch -j4 4.05.0+monda
RUN sudo apt-get -y install binutils-dev
RUN opam install -j4 -y libmonda-gdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment