formulahendry / vscode-docker-explorer

Docker Explorer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.docker-explorer
MIT License
48 stars 20 forks source link

Push only pushes to Docker Hub - cannot push to Azure Private Repository #40

Closed johnhamm closed 6 years ago

johnhamm commented 6 years ago

When I right-click an image and select "Push" the extension tries to push to Docker Hub:

C:\aci-helloworld>docker push aci-tutorial-app:latest
The push refers to repository [docker.io/library/aci-tutorial-app]
...
denied: requested access to the resource is denied

I have my Azure private repository setup and it is displayed in the Azure Registries branch of the Docker Explorer. Also, when I first installed the docker extension, I created a Docker Hub ID and entered it in the extension as well.

Then I realized that step wasn't necessary (I ony need the Azure Private Registry). However, it won't push to the Azure registry at all even when I logout of the Docker Hub registry.

I uninstalled the extension and reinstalled but it still doesn't allow me t push.

johnhamm commented 6 years ago

Never mind - I was using my Azure account credentials for the "docker login myazureregistry.azurecr.io" command.

Was able to get past it using:

az acr update --name myregistryname --admin-enabled true
az acr credential show --name myregistryname --query "passwords[0].value"
docker login -u myregistryname -p "whateverpasswordisfromstep2" myregistryname.azurecr.io