VS-code problems building and pushing to azure container registry

Viewed 728

Currently I am trying to build and push a json deployment template using vscode with docker push to an azure container registry (from here I deploy to a test machine I'm currently using) on my desktop. While the program is able to successfully build, I keep being told I am unauthorized and authentication is required.

Whats confusing to me is a problem happening specifically on the desktop. On a separate laptop, I am able to build and push the exact same project to azure. Both have the same vs-code extensions and both have docker hyper-x

Here is the output I keep getting:

Successfully built d19328623fb5
Successfully tagged registry.azurecr.io/datareader:0.0.1-amd64
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
The push refers to repository [registry.azurecr.io/datareader]
2bb83b459efa: Preparing
270c55623dec: Preparing
41541bbe5d49: Preparing
e1fb49b61103: Preparing
c5753aeba639: Preparing
eb1d9679f7a5: Waiting
7b93a090aa43: Waiting
6dc71048c62b: Waiting
f93e213b867d: Waiting
332a46295f6a: Waiting
e31a56e800f9: Waiting
72f1784c5337: Waiting
b75ffbc550d3: Waiting
428c1ba11354: Waiting
b097f5edab7b: Waiting
27712caf4371: Waiting
8241afc74c6f: Waiting
unauthorized: authentication required

I expect the push to the registry to be successful, however I cannot find any differences of why this may be happening to my desktop and not my laptop.

1 Answers

ACR requires a distinct login from the CLI. It's likely that you haven't logged in to ACR on your desktop before. Try running:

az acr login
Related