diff --git a/docker/dregsy/config.yaml b/docker/dregsy/config.yaml new file mode 100644 index 0000000..3c49ec7 --- /dev/null +++ b/docker/dregsy/config.yaml @@ -0,0 +1,66 @@ +# relay config sections +skopeo: + # path to the skopeo binary; defaults to 'skopeo', in which case it needs to + # be in PATH + binary: skopeo + # directory under which to look for client certs & keys, as well as CA certs + # (see note below) + certs-dir: /etc/skopeo/certs.d + +docker: + # Docker host to use as the relay + dockerhost: unix:///var/run/docker.sock + # Docker API version to use, defaults to 1.24 + api-version: 1.24 + +# settings for image matching (see below) +lister: + # maximum number of repositories to list, set to -1 for no limit, defaults to 100 + maxItems: 100 + # for how long a repository list will be re-used before retrieving again; + # specify as a Go duration value ('s', 'm', or 'h'), set to -1 for not caching, + # defaults to 1h + cacheDuration: 1h + +# list of sync tasks +tasks: + + - name: connect-whitelabel-app # required + + # interval in seconds at which the task should be run; when omitted, + # the task is only run once at start-up + interval: 600 + + # determines whether for this task, more verbose output should be + # produced; defaults to false when omitted + verbose: true + + # 'source' and 'target' are both required and describe the source and + # target registries for this task: + # - 'registry' points to the server; required + # - 'auth' contains the base64 encoded credentials for the registry + # in JSON form {"username": "...", "password": "..."} + # - 'auth-refresh' specifies an interval for automatic retrieval of + # credentials; only for AWS ECR (see below) + # - 'skip-tls-verify' determines whether to skip TLS verification for the + # registry server (only for 'skopeo', see note below); defaults to false + source: + registry: docker.dev-at.de + auth: eyJ1c2VybmFtZSI6ImFkbWluIiwicGFzc3dvcmQiOiJRNHB6aWhWRFl3eUthZEM3NmxiNCJ9Cg== + target: + registry: dev-docker-registry-01.smardigo.digital + auth: eyJ1c2VybmFtZSI6ImRvY2tlci1hZG1pbiIsInBhc3N3b3JkIjoieVlUZFdjUTFLTVRlbGw4RU5UeURWOWRlZFFRZlVOOFIifQo= + + # 'mappings' is a list of 'from':'to' pairs that define mappings of image + # paths in the source registry to paths in the destination; 'from' is + # required, while 'to' can be dropped if the path should remain the same as + # 'from'. Regular expressions are supported in both fields (read on below + # for more details). Additionally, the tags being synced for a mapping can + # be limited by providing a 'tags' list. This list may contain semver and + # regular expressions filters (see below). When omitted, all image tags are + # synced. + mappings: + - from: smardigo/connect-whitelabel-app + to: smardigo/connect-whitelabel-app + tags: + - 'regex: ^([0-9]|[1-9][0-9]+)\.([0-9]|[1-9][0-9]+)\.([0-9]|[1-9][0-9]+)$' diff --git a/docker/dregsy/docker-compose.yml b/docker/dregsy/docker-compose.yml new file mode 100644 index 0000000..64243c1 --- /dev/null +++ b/docker/dregsy/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3.7' + +services: + local-dregsy: + image: "xelalex/dregsy:0.4.0" + volumes: + - "./config.yaml:/config.yaml:ro" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + environment: + LOG_FORMAT: "json" \ No newline at end of file