FROM debian:10
RUN apt-get update -qq && apt-get upgrade -qq && apt-get install -qq bubblewrap build-essential libgmp-dev libpcre3-dev pkg-config m4 libssl-dev libsqlite3-dev wget ca-certificates zip unzip libncurses-dev zlib1g-dev libgd-securityimage-perl cracklib-runtime git jq npm
RUN useradd --create-home belenios
COPY .opamrc-nosandbox /home/belenios/.opamrc
COPY opam-bootstrap.sh /home/belenios
RUN mkdir -p /home/belenios/ext/opam
COPY ext/opam/bootstrap-ocaml.sh /home/belenios/ext/opam
USER belenios
WORKDIR /home/belenios
RUN ./opam-bootstrap.sh
