common/images/ocaml-merlin/Dockerfile

24 lines
635 B
Docker

ARG OPAM_VERSION="4.10"
FROM ocaml/opam2:$OPAM_VERSION
ARG OPAM_VERSION
USER root
RUN apt-get update && apt-get install -y \
m4
ENV USER "opam"
USER $USER
ENV OPAM_SWITCH_PREFIX="/home/$USER/.opam/${OPAM_VERSION}"
ENV PATH="$OPAM_SWITCH_PREFIX/bin:$PATH"
ENV CAML_LD_LIBRARY_PATH="$OPAM_SWITCH_PREFIX/lib/stublibs:$OPAM_SWITCH_PREFIX/lib/ocaml/stublibs:$OPAM_SWITCH_PREFIX/lib/ocaml"
ENV OCAML_TOPLEVEL_PATH="$OPAM_SWITCH_PREFIX/lib/toplevel"
ENV MANPATH=":$OPAM_SWITCH_PREFIX/man"
# Build system
RUN opam update && opam upgrade && opam install \
cohttp \
landmarks \
merlin \
ocamlgraph \
ocamlformat
ENV TERM=xterm-256color