Skip to content

Azure private container registry config does not work #5584

Open
@mobini-sph

Description

@mobini-sph

Bug report

Azure private registry credentials are not used by nextflow running on Azure Batch.

Expected behavior and actual behavior

Pipeline processes should be able to pull the image from the specified registry as explained here.

Steps to reproduce the problem

nextflow.config

process {
  executor = 'azurebatch'
}

azure {
  storage {
    accountName = '<storage account name>'
    accountKey = '<storage key>' 
  }
  batch {
    location = '<location>'
    accountName = '<batch account name>'
    accountKey = '<batch key>'   
    pools {
        auto {
            ...
        }
     }
  }
  registry {
    server = '<registry name>.azurecr.io' 
    userName = '<registry name>'
    password = '<registry key>'
  }
}
...

process

process process_name {

  container '<registry name>.azurecr.io/<image name>:<tag>'

  ...

}

The pipeline is executed from the command line and within Batch Nodes; neither works as expected.

Program output

The Batch Job was created but failed to start with the error below.

Name:
Message 

Value:
Head "https://<registry name>.azurecr.io/v2/<image name>/manifests/<tag>": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

The process reports the error message below.

ERROR ~ Error executing process > 

Caused by:
  One or more container images specified are invalid

Environment

  • Nextflow version: [24.10.2]
  • Java version: [openjdk 11.0.24 2024-07-16]
  • Operating system: [Linux]
  • Bash version: 5.0.17(1)-release (x86_64-pc-linux-gnu)

Additional context

Docker login and pull work fine locally and on Batch Node:

docker login <registry name>.azurecr.io -u <registry name> -p <registry key>
docker pull '<registry name>.azurecr.io/<image name>:<tag>'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions