Commit b943c1bf authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Initial commit

parents
Pipeline #9168 passed with stage
in 13 minutes and 31 seconds
build:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- |
echo "{
\"auths\": {
\"$CI_REGISTRY\": {
\"username\":\"$CI_REGISTRY_USER\",
\"password\":\"$CI_REGISTRY_PASSWORD\"
}}}
" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:4.10
only:
- master
FROM alpine:3.11 as compilation
ARG OCAML_VERSION=4.10.0
RUN apk add gcc g++ make
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
ARG OPAM_VERSION=2.1.0-alpha
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 rm -rf /src
FROM alpine:3.11 as target
LABEL Description="Minimal OCaml + opam Alpine container" Vendor="OCamlPro"
RUN apk add gcc make curl
COPY --from=compilation /usr/local /usr/local
RUN addgroup -S ocaml && adduser -S ocaml -G ocaml -s /bin/sh
USER ocaml
WORKDIR /home/ocaml
RUN ["/usr/local/bin/opam", "init", "-a", "--bare", "--disable-sandboxing"]
This repo contains a simple Dockerfile for a minimal OCaml + opam container.
It is used to generate images for (and using) gitlab.ocamlpro.com CI.
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