Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry sync #3

Open
wants to merge 23 commits into
base: sync
Choose a base branch
from
Open

Registry sync #3

wants to merge 23 commits into from

Conversation

gobha-me
Copy link

I needed the sync to pull once, so this will read the target directory and check for an existing manifest.json and ensure that the upstream has a different version prior to the copy. Also introduced go routines to thread out the compare and copy, my case has me whole sale cloning a registry, to an air gapped enclave (over 900 Repositories and counting).

Some things that are missing from this solution is Multi-arch copies. Found out the hard way that any image push with the same tag, even different arch, will over write existing in the target registry. Still looking for solutions to this problem

flavio and others added 20 commits February 25, 2019 18:28
The skopeo sync command can sync images between a SOURCE and a
destination.

The purpose of this command is to assist with the mirroring of
container images from different docker registries to a single
docker registry.

Right now the following transport matrix is implemented:

  * `docker://` -> `docker://`
  * `docker://` -> `dir:`
  * `dir:` -> `docker://`

The `dir:` transport is supported to handle the use case
of air-gapped environments.
In this context users can perform an initial sync on a trusted machine connected
to the internet; that would be a `docker://` -> `dir:` sync.
The target directory can be copied to a removable drive that can then be plugged
into a node of the air-gapped environment. From there a `dir:` -> `docker://`
sync will import all the images into the registry serving
the air-gapped environment.

The image namespace is changed during the  `docker://`
to `docker://` or `dir:` copy. The FQDN of the registry
hosting the image will be added as new root namespace of
the image. For example, the image `registry.example.com/busybox:latest`
will be copied to
`registry.local.lan/registry.example.com/busybox:latest`.

The image namespace is not changed when doing a
`dir:` -> `docker://` sync operation.

The alteration of the image namespace is used to nicely scope images
coming from different registries (the Docker Hub, quay.io, gcr,
other registries). That allows all of them to be hosted on the same
registry without incurring in clashes and making their origin explicit.

Signed-off-by: Flavio Castelli <[email protected]>
Co-authored-by: Marco Vedovati <[email protected]>
Remove the $HOME/.docker directory when tearing down a cluster,
so that subsequent cluster creations can be carried out successfully.

Signed-off-by: Marco Vedovati <[email protected]>
Add sync integration tests, covering all the possible combinations of
SOURCE,DEST.

Signed-off-by: Marco Vedovati <[email protected]>
…ries catalog, so this is my attempt at making a contribution to this project for that purpose
The skopeo sync command can sync images between a SOURCE and a
destination.

The purpose of this command is to assist with the mirroring of
container images from different docker registries to a single
docker registry.

Right now the following transport matrix is implemented:

  * `docker://` -> `docker://`
  * `docker://` -> `dir:`
  * `dir:` -> `docker://`

The `dir:` transport is supported to handle the use case
of air-gapped environments.
In this context users can perform an initial sync on a trusted machine connected
to the internet; that would be a `docker://` -> `dir:` sync.
The target directory can be copied to a removable drive that can then be plugged
into a node of the air-gapped environment. From there a `dir:` -> `docker://`
sync will import all the images into the registry serving
the air-gapped environment.

The image namespace is changed during the  `docker://`
to `docker://` or `dir:` copy. The FQDN of the registry
hosting the image will be added as new root namespace of
the image. For example, the image `registry.example.com/busybox:latest`
will be copied to
`registry.local.lan/registry.example.com/busybox:latest`.

The image namespace is not changed when doing a
`dir:` -> `docker://` sync operation.

The alteration of the image namespace is used to nicely scope images
coming from different registries (the Docker Hub, quay.io, gcr,
other registries). That allows all of them to be hosted on the same
registry without incurring in clashes and making their origin explicit.

Signed-off-by: Flavio Castelli <[email protected]>
Co-authored-by: Marco Vedovati <[email protected]>
Remove the $HOME/.docker directory when tearing down a cluster,
so that subsequent cluster creations can be carried out successfully.

Signed-off-by: Marco Vedovati <[email protected]>
Add sync integration tests, covering all the possible combinations of
SOURCE,DEST.

Signed-off-by: Marco Vedovati <[email protected]>
…ries catalog, so this is my attempt at making a contribution to this project for that purpose
gobha-me and others added 3 commits December 9, 2019 12:58
Copy link

A friendly reminder that this PR had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants