AKS Today – Hands-on with Docker

Here are some commands that I put together to give you a walkthrough of using docker to create a container image and publish it to Docker Hub.

#docker cheat sheet: https://devhints.io/docker
#Contents of the Dockerfile###
#FROM nginx
#COPY static-html-directory /usr/share/nginx/html
docker build -t mydemoimage1 .
docker images
#make sure this port is available on your machine
docker run –name mydemocontainer1 -d -p 8080:80 mydemoimage1
docker ps
docker pull hello-world
docker run hello-world
docker tag mydemoimage1 kevinmgates/mydemoimage1:v1
docker push kevinmgates/mydemoimage1:v1
kubectl run mydemocontainer1 –image=kevinmgates/mydemoimage1:v1
k get pods
az aks browse –resource-group AKS –name dddCluster
kubectl scale –replicas=3 deployment/mydemocontainer1
kubectl expose deployment mydemocontainer1 –type=LoadBalancer –port=80 –target-port=80 –name=mydemoservice1