github.com/buildtool/build-tools@v0.2.29-0.20240322150259-6a1d0a553c23/www/docs/config/registry.md (about)

     1  # Registry
     2  
     3  The `registry` key in `.buildtools.yaml` defines the docker registry used for the project.
     4  This will primarily be used for CI pipelines to push built docker images, i.e the `push` command.
     5  
     6  Locally it can be used to build images with correct tags,
     7  making it possible to deploy locally built images.
     8  
     9  Each supported registry has their own configuration keys, typically the setup looks like this:
    10  
    11  ````yaml
    12  registry:
    13    <registry name>:
    14      <specific config>
    15  ````
    16  
    17  ## Supported registries
    18  The following registries are supported:
    19  
    20  | Config key| Container registry    |
    21  | :------------- | :--------------------- |
    22  | [`dockerhub`](#dockerhub) | [Docker hub](https://hub.docker.com/) |
    23  | [`ecr`](#ecr) | [AWS Elastic Container Registry](https://docs.aws.amazon.com/ecr/index.html)  |
    24  | [`github`](#github) | [Github package registry](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages) |
    25  | [`gitlab`](#gitlab) | [Gitlab container registry](https://docs.gitlab.com/ee/user/packages/container_registry/) |
    26  | [`quay`](#quay) | [Quay docker registry](https://docs.quay.io/) |
    27  | [`gcr`](#gcr) | [Google Container registry](https://cloud.google.com/container-registry) |
    28  
    29  ### dockerhub
    30  
    31  | Parameter         | Description                          | Env variable           |
    32  | :---------------- | :----------------------------------- | :--------------------- |
    33  | `namespace`       |  The namespace to publish to         | `DOCKERHUB_NAMESPACE`  |
    34  | `username`        |  User to authenticate                | `DOCKERHUB_USERNAME`   |
    35  | `password`        |  Password for `user` authentication  | `DOCKERHUB_PASSWORD`   |
    36  
    37  ### ecr
    38  
    39  AWS Credentials must be supplied as `ENV` variables, read more [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
    40  
    41  | Parameter | Description                                                                                | Env variable           |
    42  | :-------- | :----------------------------------------------------------------------------------------- | :--------------------- |
    43  | `url`     | The ECR registry URL                                                                       | `ECR_URL`              |
    44  | `region`  | Specify a region (if it's possible to derive from the `url` parameter it can be omitted)   | `ECR_REGION`           |
    45  
    46  ### github
    47  
    48  To authenticate `token` or a combination of `username` and `password` must be provided.
    49  
    50  | Parameter       | Description                                          | Env variable             |
    51  | :-------------- | :--------------------------------------------------- | :----------------------- |
    52  | `repository`    | The repository part of the docker image name         | `GITHUB_REPOSITORY`      |
    53  | `username`      | User to authenticate                                 | `GITHUB_USERNAME`        |
    54  | `password`      | Password for `user` authentication                   | `GITHUB_PASSWORD`        |
    55  | `token`         | A personal access token to use for authentication    | `GITHUB_TOKEN`           |
    56  
    57  
    58  ### gitlab
    59  
    60  
    61  | Parameter    | Description                                       | Env variable        |
    62  |:-------------|:--------------------------------------------------|:--------------------|
    63  | `registry`   | The registry part of the docker image name        | `CI_REGISTRY`       |
    64  | `repository` | The repository part of the docker image name      | `CI_REGISTRY_IMAGE` |
    65  | `user`       | User to authenticate                              | `CI_REGISTRY_USER`  |
    66  | `token`      | A personal access token to use for authentication | `CI_JOB_TOKEN`      |
    67  
    68  ### quay
    69  
    70  
    71  | Parameter       | Description                                          | Env variable         |
    72  | :-------------- | :--------------------------------------------------- | :------------------- |
    73  | `repository`    | The repository part of the docker image name         | `QUAY_REPOSITORY`    |
    74  | `username`      | User to authenticate                                 | `QUAY_USERNAME`      |
    75  | `password`      | Password for `user` authentication                   | `QUAY_PASSWORD`      |
    76  
    77  ### gcr
    78  
    79  GCP Credentials must be supplied as [service account json key](https://cloud.google.com/container-registry/docs/advanced-authentication#json-key) (Base64 encoded)
    80  
    81  | Parameter         | Description                       | Env variable           |
    82  | :---------------- | :-------------------------------- | :--------------------- |
    83  | `url`             | The GCR registry URL              | `GCR_URL`              |
    84  | `keyfileContent`  | ServiceAccount keyfile content    | `GCR_KEYFILE_CONTENT`  |