1

I have a local tarball that I can import into Azure ACR via docker CLI:

docker import ./thing.tar myacr.azurecr.io/repo:tag

I would like to do the same via the Azure CLI, but the az acr import command seems to only be able to accept a docker repo, and not a tarfile.

Any help would be much appreciated. I am reasonably new to Azure and Docker.

Vish
  • 31
  • 4
  • Using `docker import` (at all) is pretty unusual. You should be able to `docker build` your image from the Dockerfile you have checked into source control, and `docker push` it to ACR. – David Maze Feb 05 '20 at 14:46
  • It's not a Dockerfile. It's a tarball from a 3rd party supplier. Inside the tarball is a bunch or folders and a manifest.json. `docker import...` as above, followed by a `docker push myacr.azurecr.io/repo:tag` works fine. But I need to have this running within a docker container that has the Azure CLI installed. – Vish Feb 05 '20 at 14:59
  • Do you mean `docker load`? – David Maze Feb 05 '20 at 16:11
  • No, I can currently achieve what I need by running: `docker import ...`, `az acr login -n ${ACR}` and then `docker push ${ACR}.azurecr.io${REPO}:${TAG}`. I was just hoping to replace the `docker` commands with `az` ones. – Vish Feb 06 '20 at 03:50
  • @DavidMaze, you were indeed correct. I was supposed to use `docker load`. – Vish Mar 06 '20 at 12:47

0 Answers0