Skip to main content

Posts

Showing posts from October, 2020

Az-204 Docker to Container registry to AKS

 1. https://github.com/Azure-Samples/azure-voting-app-redis.git -- pull this code from github  2.  it has a docker-compose file . So run docker-compose up -d  3. Create a container registry.  4. Tag the docker image to the container registry. docker tag hello-world demoacr5416.azurecr.io/hello-world-demo:v1 hello-world: name of the image demoacr5416.azurecr.io -- name of the ACR hello-world-demo:v1 -- what we want to call it inside ACR 5. push   https://pascalnaber.wordpress.com/2020/01/21/access-keyvault-from-azure-kubernetes-service-aks-with-an-asp-net-core-application-using-a-managed-identity/ VISUAL STUDIO APP TO DOCKER 1. Publish the app to a folder (publish). FROM  mcr.microsoft.com/dotnet/core/aspnet:3.1 WORKDIR  /app EXPOSE  80 EXPOSE  443 COPY  ./publish . ENTRYPOINT  [ "dotnet" ,  "ACRTOAKS.dll" ] copy the publish file into a folder called publish and paste the docker file. Then copy everything ins...

Docker

 1.  docker run --rm -it microsoft/dotnet:2-runtime  Run linux container cmd. we get a command prompt for the container. 2. share a folder from host to container-- windows to linux docker run -it --rm -v E:\Docker\code\ACRTOAKS:/abcd microsoft/dotnet:2-runtime from E:\Docker\code\ACRTOAKS to /abcd inside the container 3. Get IP Address of the container docker inspect containername docker ps --list all running containers