dev-sec / docker-ansible

Docker containers that include ansible latest stable 2.x version.
GNU General Public License v3.0
23 stars 14 forks source link

Create images under new namespace #20

Closed rndmh3ro closed 1 year ago

rndmh3ro commented 1 year ago

Is your feature request related to a problem? Please describe. Now that the docker images are moved to this new organization, we should create the docker images under the new organization, too. We need to check which registry we will use.

If the Dockerhub provides a redirection-method when you docker pull and image, we should use that. Otherwise we should push to the old namespace as well as the new one.

nejch commented 1 year ago

IIRC redirects are not possible due to how image paths are stored in the manifests themselves.

But @rndmh3ro IMO it might make sense to push directly to ghcr.io as there is no need for static credentials and you avoid any further changes to Docker Hub limits/pricing & policies that have been going on recently.

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-in-a-github-actions-workflow

I think changing to ghcr.io would simply be a matter of changing the workflow files and removing the static secrets, and once they start building on main the new images should appear in this project's registry.

The old images would stay on dockerhub so it wouldn't break anything until downstream references are updated to use the new registry.

/cc @dlouzan

schurzi commented 1 year ago

I am also in favor of using ghcr.io instead of Dockerhub

nejch commented 1 year ago

FWIW I just tried ghcr.io on the all.yml workflow to test a manual push and it looks very smooth:

https://github.com/dev-sec/docker-ansible/compare/7af061acb12e9f34e3ffbc3aa7900bc0e17ca8c5...2922f5ca8a14b37fef94ae36b7d7409874f54c47 https://github.com/nejch?tab=packages&repo_name=docker-ansible https://github.com/nejch/docker-ansible/pkgs/container/docker-alpine-ansible

I can open a PR later (with cleanup and all the other changes needed) if this make sense to you.

rndmh3ro commented 1 year ago

I can open a PR later (with cleanup and all the other changes needed) if this make sense to you.

Yes, that'd be great. However I'd like to push the images also to the dockerhub in the rndmh3ro-namespace. Can you add both, please?

nejch commented 1 year ago

I can open a PR later (with cleanup and all the other changes needed) if this make sense to you.

Yes, that'd be great. However I'd like to push the images also to the dockerhub in the rndmh3ro-namespace. Can you add both, please?

Sounds good, will do! I'll wait for https://github.com/dev-sec/docker-ansible/pull/22 to make sure that's deployed correctly first.