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

VersionChooser: Allow login for docker daemon by version chooser interface #3109

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

JoaoMario109
Copy link
Collaborator

@JoaoMario109 JoaoMario109 commented Jan 28, 2025

Allows users to perform a Docker login to the default Docker registry or custom registries using their Docker username and password or a Personal Access Token (PAT).

Effectively allows for the following:

  • Mirrors the functionality of the docker login command.
  • Saves credentials to .docker/config.json for both the normal user and the root user (if specified).
  • Affects the entire Docker daemon context, enabling all BlueOS services to fetch images or other resources from the authenticated registry.

To access users must be in pirate mode on the version chooser page:
image


By default, the dialog logs in using only the normal Raspberry Pi user (not root) and the default Docker registry (https://index.docker.io/v1/).

If needed, users can:

  • Authenticate to a custom registry by enabling the Custom Registry switch.
  • Use the authentication for sudo docker commands by enabling the Login as Root User switch.

image

Connected accounts can be seen at the accounts tab. Ones with the shield icon means that the credentials are valid for sudo docker commands.

image

Validation:

  • Trying to pull private repository without login:
    image_2025-01-28_15-53-12
  • Trying to pull private repository after performing login:
    image

NOTE: This PR does not includes the on login authentication check, and does not allows users to test their credentials to check if they still valid. A following PR will add the check, probably matching the auth endpoint docs.

@JoaoMario109 JoaoMario109 added the docs-needed Change needs to be documented label Jan 28, 2025
@JoaoMario109 JoaoMario109 marked this pull request as ready for review January 28, 2025 18:58
* Add bind for .docker/config.json files for both normal user and root
  user
* Add docker login module
* Add docker login API
* Add docker login component modal
* Connect docker login to VersionChooser page
* Modify version chooser (Service/Types) files to include new docker
  login API
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

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

really nice!

@patrickelectric patrickelectric merged commit e8089c3 into bluerobotics:master Jan 30, 2025
6 checks passed
@goasChris
Copy link

amazing!! This saves my butt when you have a whole swarm of robots on the same outgoing IP ;) thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-needed Change needs to be documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants