Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (65 sloc) 1.99 KB
FROM ubuntu:16.04
MAINTAINER Guillaume Claret
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y apt-utils
RUN apt-get install -y gcc make git
RUN apt-get install -y curl m4 ruby
RUN apt-get install -y aspcud mercurial
RUN apt-get install -y g++ coinor-csdp
RUN apt-get install -y unzip liblablgtk-extras-ocaml-dev
RUN apt-get install -y autoconf perl
# Bench user
RUN useradd --create-home bench
USER bench
ENV HOME /home/bench
# OCaml
WORKDIR /home/bench
RUN curl -L<%= ocaml %>.tar.gz |tar -xz
WORKDIR ocaml-<%= ocaml %>
RUN ./configure && make world.opt
USER root
RUN make install
USER bench
<% camlp4 = {
"4.02.0" => "4.02.0+2",
"4.02.1" => "4.02.1+1",
"4.02.2" => "4.02+6",
"4.02.3" => "4.02+6"
} %>
<% if camlp4[ocaml] %>
# Camlp4
WORKDIR /home/bench
RUN curl -L<%= camlp4[ocaml] %>.tar.gz |tar -xz
WORKDIR camlp4-<%= camlp4[ocaml].gsub("+", "-") %>
RUN ./configure && make all
USER root
RUN make install
USER bench
<% end %>
WORKDIR /home/bench
RUN curl -L<%= opam %>/opam-full-<%= opam %>.tar.gz |tar -xz
WORKDIR opam-full-<%= opam %>
RUN ./configure && make lib-ext && make
USER root
RUN make install
USER bench
# Initialize OPAM.
ENV OPAMJOBS <%= jobs %>
# Initialize Git
RUN git config --global "" && git config --global "Bench B. Bench" && git config --global push.default simple
# Initialize the bench folder.
ADD . /home/bench/run
WORKDIR /home/bench/run
USER root
RUN chown -R bench:bench .
USER bench
# Add the private key to push to
RUN mkdir ~/.ssh && cp id_rsa ~/.ssh/ && chmod 400 ~/.ssh/id_rsa && cp ssh_config ~/.ssh/config
# Get the HTML.
WORKDIR /home/bench
RUN curl -L |tar -xz
WORKDIR make-html-master
RUN git clone html
# Start.
WORKDIR /home/bench/run