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

Push Antrea Ubuntu-based images to ghcr.io #6834

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

antoninbas
Copy link
Contributor

The Github Container Registry (ghcr.io) is introduced as an alternative to Docker Hub for users. There is no change to how images are pushed to Docker Hub, but antrea/antrea-agent-ubuntu and
antrea/antrea-controller-ubuntu are now also available in ghcr.io, as antrea-io/antrea-agent-ubuntu and antrea-io/antrea-controller-ubuntu respectively.

We do not retroactively push previously-released images to ghcr.io. Antrea v2.3 will be the first release also available in ghcr.io.

In the future, we may also push UBI-based images to ghcr.io.

Fixes #6454

The Github Container Registry (ghcr.io) is introduced as an alternative
to Docker Hub for users. There is no change to how images are pushed to
Docker Hub, but antrea/antrea-agent-ubuntu and
antrea/antrea-controller-ubuntu are now also available in ghcr.io, as
antrea-io/antrea-agent-ubuntu and antrea-io/antrea-controller-ubuntu
respectively.

We do not retroactively push previously-released images to
ghcr.io. Antrea v2.3 will be the first release also available in ghcr.io.

In the future, we may also push UBI-based images to ghcr.io.

Fixes antrea-io#6454

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas added this to the Antrea v2.3 release milestone Nov 26, 2024
@antoninbas antoninbas added action/release-note Indicates a PR that should be included in release notes. area/build-release Issues or PRs related to building and releasing labels Nov 26, 2024
@antoninbas
Copy link
Contributor Author

Tested with this branch: https://github.com/antrea-io/antrea/tree/push-antrea-ubuntu-images-to-ghcr.io-test

See uploaded packages (with test-latest tag): https://github.com/orgs/antrea-io/packages

Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two nits
does ghrc.io support anonymous pulling? I got following error:

docker pull ghcr.io/antrea-io/antrea-controller-ubuntu-amd64:test-latest
Error response from daemon: Head "https://ghcr.io/v2/antrea-io/antrea-controller-ubuntu-amd64/manifests/test-latest": unauthorized

registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Antrea Docker image to registries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Build and push Antrea Docker image to registries
- name: Build and push Antrea Docker images to registries

registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Antrea Ubuntu Docker image to registries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Github Container Registry
if: ${{ needs.check-env.outputs.push_needed == 'true' && matrix.registry == "ghcr.io" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, don't know how I missed just that one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tool probably can help to catch the syntax error with dry-run mode: https://github.com/nektos/act

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor Author

@tnqn @luolanzone thanks for the reviews

does ghrc.io support anonymous pulling? I got following error

Yes, but I had to make all the packages public. It's done now and pulls should work.

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/build-release Issues or PRs related to building and releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Antrea images (for Agent and Controller) available in ghcr.io
3 participants