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.

Extended Compatibility Mode

By default, Docker runs inside the build container. Depending on how you use Docker, you might run into errors like open /proc/####/environ: permission denied, failed to register layer or general permission/operation denied errors.

For these cases, Scrutinizer provides a separate environment with a Docker engine running that provides you broader compatibility that works for most use-cases. Simply, set the remote_engine flag to true in your configuration:

build:
    environment:
        docker:
            remote_engine: true

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.