Open TonyCTHsu opened 3 days ago
Essentially this would make this repo and its ghcr.io/datadog/images-rb
registry a mirror, which is fine and in scope.
A corresponding directory structure and image naming scheme should be devised, e.g quick thinking:
src/mirror/
hub.docker.com/ # is that it? or rather some `docker.io`, or just `docker`, or nothing?
datadog/
agent/
latest/ # last component is the default base tag
Dockerfile # can contain `append-tags: 1.2.3`, but then should strip away the `latest` special case tag?
elasticsearch/
8.1/
Dockerfile
...
ghcr.io/
datadog/
dd-apm-test-agent/
v1.12/
Dockerfile
...
Tooling (docker.rake
) might need to be slightly updated. CI workflow will probably need an overhaul and made more generic with reusable parts, which is on the table anyway for sustainability.
A corresponding directory structure and image naming scheme should be devised
Do we really need this? I think it is quite straightforward with a YAML as https://github.com/DataDog/images/blob/master/mirror.yaml defined them.
images:
- source: "docker.io/library/postgres:9.6"
dest:
repo: "postgres"
tag: "9.6"
Not sure how it is done or if we can leverage the existing https://github.com/DataDog/images to do this (we might just need a simplified versions of it).
From what I understand, in order to build a mirror, we need a source and a destination and do something like:
docker pull docker.io/repository/image:tag
docker tag docker.io/repository/image:tag ghcr.io/USERNAME/IMAGE:TAG
docker push ghcr.io/USERNAME/IMAGE:TAG
Here is something interesting about https://github.com/DataDog/images
mirror.lock.yaml
with sha for checksum?registry.ddbuild.io
Why
Pulling images from
ghcr.io
is more reliable for automations in Github Actions. It also avoid hitting the rate limit threshold for Dockerhub.Here is a list of images we used from https://github.com/DataDog/dd-trace-rb
datadog/agent
ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.12.0
elasticsearch:8.1.3
memcached:1.5-alpine
mongo:3.6
mysql:8.0
opensearchproject/opensearch:2.8.0
postgres:9.6
starburstdata/presto:332-e.9
redis:6.2