# Opam-ci: new distributions available

**URL:** https://discuss.ocaml.org/t/opam-ci-new-distributions-available/2899
**Category:** Community
**Tags:** opam
**Created:** [November 16, 2018, 12:18pm UTC](https://discuss.ocaml.org/t/opam-ci-new-distributions-available/2899 "2018-11-16T12:18:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)
#### Post date: [November 16, 2018, 12:18pm UTC](https://discuss.ocaml.org/t/opam-ci-new-distributions-available/2899/1 "2018-11-16T12:18:17Z")

</div>

I’ve pushed a update to the Dockerfile generation on the [ocaml/opam2](https://hub.docker.com/r/ocaml/opam2) Docker Hub images to account for newer distributions that have been released. We now build:

- `fedora-29` (alias `fedora`)
- `alpine-3.8` (alias `alpine`)
- `opensuse-15.0` (alias `opensuse`)
- `ubuntu-18.10` (alias `ubuntu`)

We now also publish the development version of the compiler to make for easier testing of trunk, via the `4.08` tag.

The full list can be found on the [containers infrastructure wiki](https://github.com/ocaml/infrastructure/wiki/Containers) along with general instructions on how to use the Docker images.

The source code that generates these images is in [ocaml-dockerfile](https://github.com/avsm/ocaml-dockerfile) for the library, [obi](https://github.com/ocaml/obi) for the binaries. If you are interested in adding a new Linux distribution, take a look at [Dockerfile\_distro](http://anil-code.recoil.org/ocaml-dockerfile/doc/dockerfile-opam/Dockerfile_distro/index.html) module for how to get started.

---

<div class="post-metadata">

### Author: ![ruffsl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ruffsl/32/1319_2.png) [@ruffsl](https://discuss.ocaml.org/u/ruffsl)
#### Post date: [November 28, 2018, 3:09am UTC](https://discuss.ocaml.org/t/opam-ci-new-distributions-available/2899/2 "2018-11-28T03:09:37Z")

</div>

Where can we read the final generated Dockerfile that avsm/ocaml-dockerfile is being used to create?  
I’d like to check how ocaml is being installed and setup for the given ocaml image I’d like to build from.

---

<div class="post-metadata">

### Author: ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)
#### Post date: [November 28, 2018, 7:07pm UTC](https://discuss.ocaml.org/t/opam-ci-new-distributions-available/2899/3 "2018-11-28T19:07:09Z")

</div>

Every image on `ocaml/opam2` includes the Dockerfile used to create it within the image itself, in `/Dockerfile` (thanks to a [user request](https://github.com/ocaml/obi/commit/79b5f50a090da5ebb4c5866da8d11cab97329e82)).

e.g.:

```auto
$ docker run ocaml/opam2 cat /Dockerfile
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-opam
WORKDIR /home/opam/opam-repository
RUN git pull origin master && \
  opam-sandbox-disable && \
  opam init -k git -a /home/opam/opam-repository --bare && \
  opam switch create 4.03 ocaml-base-compiler.4.03.0 && \
  opam switch create 4.04 ocaml-base-compiler.4.04.2 && \
  opam switch create 4.05 ocaml-base-compiler.4.05.0 && \
  opam switch create 4.06 ocaml-base-compiler.4.06.1 && \
  opam switch create 4.07 ocaml-base-compiler.4.07.1 && \
  opam switch 4.07
ENTRYPOINT ["opam", "config", "exec", "--"]
RUN opam install -y depext
ENV OPAMYES 1
CMD bash
ADD ocaml-amd64/Dockerfile.debian-9 /Dockerfile

```

or for the version-specific variants:

```auto
$ docker run ocaml/opam2:4.07 cat /Dockerfile
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-opam
WORKDIR /home/opam/opam-repository
RUN opam-sandbox-disable && \
  opam init -k git -a /home/opam/opam-repository --bare && \
  opam switch create 4.07 ocaml-base-compiler.4.07.1 && \
  opam switch create 4.07+afl ocaml-variants.4.07.1+afl && \
  opam switch create 4.07+flambda ocaml-variants.4.07.1+flambda && \
  opam switch create 4.07+default-unsafe-string ocaml-variants.4.07.1+default-unsafe-string && \
  opam switch create 4.07+force-safe-string ocaml-variants.4.07.1+force-safe-string && \
  opam switch 4.07 && \
  opam install -y depext
ENV OPAMYES 1
ENTRYPOINT ["opam", "config", "exec", "--"]
CMD bash
ADD ocaml-amd64/Dockerfile.debian-9-ocaml-4.07 /Dockerfile

```

They are generated using the `obi-gitlab` command line tool from the [https://github.com/ocaml/obi](https://github.com/ocaml/obi) repository, and are triggered from CI via [a GitLab Pipelines setup](https://gitlab.com/ocaml-platform/ci/blob/master/.gitlab-ci.yml).
