Using Docker

You can also make use of Docker in Scrutinizer?s build environment. Simply enable it by adding the following to your configuration:

build:
    environment:
        docker: true

This will automatically start the Docker daemon and install a recent version of Docker Compose.

Defining Registry Logins

If you want to push images or pull private images from a registry, you can define logins in the configuration:

build:
    environment:
        docker:
            logins:
            - { username: "my-user", password: "my-password" } # DockerHub
            - { username: "another-user", password: "some-pass", server: "quay.io" }

Caching Images

If you would like us to cache certain base images, you can define those too:

build:
    environment:
        docker:
            cache:
                images:
                - "scrutinizer/web:base-123"     # Exact name including tag name
                - "scrutinizer/*"                # Wildcard match against repository name
Note: We currently have to use the vfs storage driver of Docker. This means that each layer is a full copy of the image. If you have many layers, it may be faster to not cache them, but re-download them on-the-fly.