Docker

Azure Container Instances

Azure Container Groups

  • Use case is that if you have two applications, one is web app and other is Database then put them in same container group they will share the same resources and storage volumes.
  • Now we will see how to setup an application against MySQL database.
  • Choose Azure MySql database service,
  • Uninstall this Nuget package,
  • Install MySql.Data Nuget package,
  • Add your IP address here to access from your machine,
  • Take connection string from here,
  • Update the connection string, uid and password in your code,

Deploying MySQL database container

Creating custom MySQL image

Deploy Azure Container Group

Azure Kubernetes Service

Notes

  • What are multi stage builds?
  • Dockerfile
  • dockerfile
  • The first command indockerfile can be to copy the application.
  • FROM, EXPOSE, ENTRYPOINT
  • sudo docker tag command is used to publish an image in the Azure container registry.
sudo az acr login --name appRegistry30 --username appRegistry30 --password
sudo docker tag
sudo docker push

Questions