Add simple CLI to interact with Diun through gRPC Create image and notif proto services Compile and validate protos through a dedicated Dockerfile and bake target Implement proto definitions Move server as `serve` command New commands `image` and `notif` Refactor command line usage doc Better CLI error handling Tools build constraint to manage tools deps through go modules Add upgrade notes Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
3.7 KiB
Registry options configuration
Overview
Registry options is used to authenticate against a registry during the analysis of an image:
regopts:
- name: "myregistry"
username: fii
password: bor
timeout: 30s
- name: "docker.io"
selector: image
username: foo
password: bar
- name: "docker.io/crazymax"
selector: image
usernameFile: /run/secrets/username
passwordFile: /run/secrets/password
myregistrywill be used as anameselector (default) if referenced by its name.docker.iowill be used as animageselector. If an image is on DockerHub (docker.iodomain), this registry options will be selected if not referenced as aregoptname.docker.io/crazymaxwill be used as animageselector. If an image is on DockerHub and incrazymaxnamespace, this registry options will be selected if not referenced as aregoptname.
Configuration
name
Unique name for registry options. This name can be used through diun.regopt
Docker / Swarm label
or Kubernetes annotation and also as regopt for the
Dockerfile and File providers.
!!! warning * Required * Must be unique
!!! example "Config file"
yaml regopts: - name: "myregistry"
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_NAME
selector
What kind of selector to use to retrieve registry options. (default name)
!!! warning
* Accepted values are name or image
nameselector is the default value and will retrieve this registry options only if it's referenced by its name.imageselector will retrieve this registry options if the given image matches the registry domain or repository path.
!!! example "Config file"
yaml regopts: - name: "myregistry" selector: name
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_SELECTOR
username
Registry username.
!!! example "Config file"
yaml regopts: - name: "myregistry" username: foo
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_USERNAME
usernameFile
Use content of secret file as registry username if username not defined.
!!! example "Config file"
yaml regopts: - name: "myregistry" usernameFile: /run/secrets/username
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_USERNAMEFILE
password
Registry password.
!!! example "Config file"
yaml regopts: - name: "myregistry" username: foo password: bar
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_PASSWORD
passwordFile
Use content of secret file as registry password if password not defined.
!!! example "Config file"
yaml regopts: - name: "myregistry" passwordFile: /run/secrets/password
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_PASSWORDFILE
timeout
Timeout is the maximum amount of time for the TCP connection to establish. (default 0 ; no timeout)
!!! example "Config file"
yaml regopts: - name: "myregistry" timeout: 30s
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_TIMEOUT
insecureTLS
Allow contacting docker registry over HTTP, or HTTPS with failed TLS verification. (default false)
!!! example "Config file"
yaml regopts: - name: "myregistry" insecureTLS: false
!!! abstract "Environment variables"
* DIUN_REGOPTS_<KEY>_INSECURETLS