cool-easter-32542
03/10/2023, 7:43 PMpants test
tries to do the same, it results in:
Exception: Failed to pull image `***<http://registry.azurecr.io/runner/ubuntu20_***|registry.azurecr.io/runner/ubuntu20_***>`: Failed to pull Docker image `***<http://registry.azurecr.io/runner/ubuntu20_***|registry.azurecr.io/runner/ubuntu20_***>`: DockerResponseServerError { status_code: 500, message: "Get \"[https://***<http://registry.azurecr.io/v2/runner/ubuntu20_***/tags/list\|registry.azurecr.io/v2/runner/ubuntu20_***/tags/list\>](https://***<http://registry.azurecr.io/v2/runner/ubuntu20_***/tags/list/|registry.azurecr.io/v2/runner/ubuntu20_***/tags/list/>)": unauthorized: authentication required, visit <https://aka.ms/acr/authorization> for more information." }
I am logging in to ACR using this step:
- name: Login to ACR
uses: azure/docker-login@v1
with:
login-server: *****<http://registry.azurecr.io|registry.azurecr.io>
username: ${{ secrets.SP_ACR_PULL_ID }}
password: ${{ secrets.SP_ACR_PULL_PASSWORD }}
I can see that the ACR login steps yields this:
DOCKER_CONFIG=/home/runner/work/_temp/docker_login_1675410905572
This ensures that if I run the following step, that is successful:
- name: Test pulling from ACR
run: docker pull *****<http://registry.azurecr.io/runner/ubuntu20_*****|registry.azurecr.io/runner/ubuntu20_*****>
However, pants test
is not as successful.
The Docker image is configured like this:
docker_environment(
name="docker-env-ubuntu20-*****",
platform="linux_x86_64",
image="*****<http://registry.azurecr.io/runner/ubuntu20_*****|registry.azurecr.io/runner/ubuntu20_*****>",
python_bootstrap_search_path=["<PATH>"],
docker_env_vars=["DOCKER_CONFIG"],
)
I have also tried without docker_env_vars=["DOCKER_CONFIG"]
, and it doesn't seem to make a difference.
Pants version
2.15.0rc2
OS
Ubuntu on GitHub Actions
Additional info
https://pantsbuild.slack.com/archives/C046T6T9U/p1675414472629759
pantsbuild/pantscool-easter-32542
03/10/2023, 7:43 PMcool-easter-32542
03/20/2023, 7:37 PMcool-easter-32542
03/20/2023, 10:58 PM