Instructions below describe a quick way how to build and push a Docker image to Azure container registry using VS Code extension for Azure or CLI tools.
-
Ensure Azure Resources Extension is installed in VSCode
-
Ensure Docker Extension is installed in VSCode
-
Build the docker image using command
docker build . -t some-registry.azurecr.io/multi-bot-soe:latest
Ensure that tag contains correct bot registry url and the docker image name that is linked with the web app.
-
Navigate to new
Docker
tab, underimages
subscription and right click newly created image. Presspush
and confirm popup messages
There is an alternative to docker, it is podman!
- Install:
brew install podman
- Download and prepare the VM:
podman machine init
- Turn on the VM:
podman machine start
- Uses as a docker (test):
podman run -d -p 8000:80 nginx
- Verify container is running (test):
podman ps
podman build . -t -t some-registry.azurecr.io/multi-bot-soe:latest
-
Create a sym link for docker binary:
-
Mac Homebrew M1:
ln -s /opt/homebrew/bin/podman /usr/local/bin/docker || true
-
Mac Homebrew Intel:
ln -s /usr/local/bin/podman /usr/local/bin/docker || true
-
-
Login to Azure container registry:
az login az acr login --name some-registry
-
Push the image:
podman push some-registry.azurecr.io/multi-bot-soe:latest
For more details, take a look at official Azure documentation:
© Copyright IBM Corporation 2022. All Rights Reserved.