Skip to content

Using Workspace Connections for Docker Authentication in Serverless Builds #1985

Description

Title

How to properly pass workspace connection credentials to Docker builds on AML serverless compute

Description

Problem Statement

I'm trying to set up a Docker build on Azure ML serverless compute that needs to authenticate to a private PyPI feed during the image build phase. The image needs to install Python packages from a private Azure DevOps Artifacts feed.

What I'm Trying to Achieve

  • Create a Docker image that installs packages from a private PyPI mirror
  • Use Azure DevOps Personal Access Token (PAT) for authentication (I am happy to use a different way if it is more sustainable and better)
  • Run this on AML serverless compute (not a dedicated compute cluster)
  • Securely pass credentials without hardcoding them

Activity

  1. acube3 commented on Nov 7, 2025

    @acube3
    Author

    The docker build happens as part of the AML pipeline job which gets dockerfile as reference. The docker build gets instantiated using serverless job as part of the pipeline job. The docker creates the conda environment, then it tries to install (using pip) python packages from private azure devops PyPI (this is where authentication error happens). It also installs a wheel in the same conda environment. I can run the docker build by providing PAT as Azure devops token as build secret while doing docker build locally. I am not sure how that can be achieved on AML when serverless job runs docker image creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions