Customization of base image builders

Warning

This requires knowledge of image building technologies.

Warning

This is an experimental feature. API stability is not guaranteed and might be subject to changes.

When building the base image with

./bin/dssadmin build-base-image --type container-exec

the default Docker image builder is used against the local docker daemon running on the host. This can be customized with different setups and different image building technologies. To do so, edit the DATADIR/config/base-image-builders.json`

Docker

You can customize the default settings with which the image build with docker is done.

[
    {
        "type": "docker",
        "config": {
            "host": "tcp://127.0.0.1:2375",
            "tls_verify": true,
            "cert_path": "/path/to/certs",
            "registries": [
              {"registry_url": "ACCOUNT.dkr.ecr.REGION.amazonaws.com", "prepush_mode": "ECR"},
              {"registry_url": "custom-registry.example.com", "prepush_mode": "CUSTOM", "prepush_script": "/some/path/script.sh"}
            ],
        }
    }
]

Buildah in cluster

This relies on buildah to build images directly in a container running in a kubernetes cluster. To use this builder set the following configuration

[
    {
        "type": "dku-managed-in-cluster",
        "config": {
            "kubeconfig": "/path/to/kubeconfig",
            "context": "kubernetes",
            "namespace": "dku-in-cluster-builder",
            "create_namespace": true,
            "base_image_registry": {
              "registry_url": "ACCOUNT.dkr.ecr.REGION.amazonaws.com`"
              "prepush_mode": "ECR"
            }
        }
    }
]