Commit 144ec61f authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Condense Dockerfile for smaller intermediate containers footprint

parent cac2df9a
Pipeline #12461 passed with stages
in 26 seconds
......@@ -5,22 +5,14 @@ ARG OCAML_VERSION=4.11.1
RUN apk add gcc g++ make coreutils openssl
ADD https://github.com/ocaml/ocaml/archive/${OCAML_VERSION}.tar.gz /src/ocaml.tar.gz
WORKDIR /src/ocaml
RUN tar xzf ../ocaml.tar.gz --strip-components=1
RUN ./configure
RUN make world.opt
RUN make install
RUN tar xzf ../ocaml.tar.gz --strip-components=1 && ./configure && make world.opt && make install && rm -rf /src/ocaml
ARG OPAM_VERSION=2.1.0-beta4
ADD https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-full-${OPAM_VERSION}.tar.gz /src/opam.tar.gz
WORKDIR /src/opam
RUN tar xzf ../opam.tar.gz --strip-components=1
RUN ./configure
RUN make lib-ext
RUN make
RUN make install
RUN tar xzf ../opam.tar.gz --strip-components=1 && ./configure && make lib-ext && make && make install && rm -rf /src/opam
RUN rm -rf /src
FROM alpine:3.11 as target
LABEL Description="Minimal OCaml + opam Alpine container" Vendor="OCamlPro"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment