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

Batch Pool does not support private org dockerhub repositories #107

Open
arun-nemani opened this issue Apr 17, 2021 · 4 comments
Open

Batch Pool does not support private org dockerhub repositories #107

arun-nemani opened this issue Apr 17, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@arun-nemani
Copy link

arun-nemani commented Apr 17, 2021

Problem Description

Azure batch integration with dockerhub repositories during pool creation works as expected for public repositories (both user based and org based, but not for org private repositories. I have also confirmed that private repository connections work as expected when the target private repository is under the user dockerhub account, and the exact user login credentials are provided.

However, private dockerhub connections do not work as expected for organization based private repositories, where member dockerhub login credentials are provided.

Steps to Reproduce

Azure Batch --> Add Pool
Image Type: Marketplace
Publisher: microsoft-azure-batch
Offer: ubuntu-server-container
Sku: 20-04-lts
Container Configuration:

  • Container image names: XXXXXXXXXX
  • Registry username: XXXXXX
  • Password: XXXXXX
  • Registry server: index.docker.io

Expected Results

Idle State for VM node upon Pool creation

Actual Results

Message - pull access denied for XXXXXXXX, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Additional Comments

Further confirmations:

  • Confirmed dockerhub member access credentials are correct for the private repo housed under organization (confirmed via docker login and docker pull...
  • Confirmed dockerhub organization is correctly allowing read access to desired dockerhub team members.
  • Confirmed org repository when converted to public, works as expected on Azure Batch
  • Confirmed that simply converting org repository to private results in Pool errors on Azure Batch
    I have confirmed that if I make this repository named XXXXX when designates as public works as expected when creating a pool (even with registry username and password already specified). However, converting this repository to private, causes the error stated above.
@arun-nemani arun-nemani changed the title Batch Pool does not support private dockerhub repositories Batch Pool does not support private org dockerhub repositories Apr 17, 2021
@alfpark
Copy link
Contributor

alfpark commented Apr 19, 2021

Tagging @bgklein and @staer.

@alfpark alfpark added the under investigation Under investigation by team label Apr 19, 2021
@okofish
Copy link

okofish commented Oct 22, 2021

I got this to work by setting "registryServer": "docker.io" and, crucially, explicitly qualifying the registry in the container image name like docker.io/myorg/myrepo.

I suspect Batch might be naively looking for a domain component in the image name to match against the list of defined registries.

@staer
Copy link
Contributor

staer commented Oct 26, 2021

thanks for the update, I'll take a look to see what is going on under the hood here

@staer staer self-assigned this May 3, 2022
@staer staer added bug Something isn't working and removed under investigation Under investigation by team labels May 3, 2022
@staer
Copy link
Contributor

staer commented May 3, 2022

I believe that I have identified the code at fault being the bit that maps the repository to authentication. As @okofish noted, a temporary workaround is to specify the full docker.io repository URL in the image name. I will work on a more permanent fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants