sábado, janeiro 29, 2022

Docker CLI and Azure ACI

I know, there are several good articles about how we can use docker CLI to deploy our workload to Azure ACI. I like to write short articles, it helps me understand the technology.

You can find a good documentation regarding ACI here.

I will deploy a Multi Container application using a docker compose command. Let's do it!

First, Login on Azure using

$docker login azure

Tip: You can use --tenant-id to connect to a specific Azure tenant.

Create a docker context, on my example the name is acideployblog, you need to select the subscription, resource group.

$docker context create aci acideployblog

 

You will get:

Successfully created aci context "acideployblog"

 You can list the docker context with the command

$docker context list

To set the default context

$docker context use acideployblog

To show the current context

$docker context show

Important, you must log in to your Azure Container Registry

$az acr login --name mycontainerregistry

One the directory that I have my docker compose file I run:

$docker compose --file docker-compose.staging.yml --project-name myproject-server-staging u

If you don't put a --project-name the name of your container will be derived from the working directory.

If everything goes right your container group will be create:

 

You can check the container execution list with the command

$docker ps

quarta-feira, janeiro 12, 2022

Custom Domain - Azure App Proxy

 These are the steps to add a custom domain on an existing Azure App Proxy. 

Go to the Enterprise Applications - Click on your Application and go to the Application proxy, edit and add the custom domain, after that you need to import the SSL certificate, just two images for reference: