Contact Info
London Office :
Denizli Office :
Pamukkale Üniversitesi Teknoloji Geliştirme Merkezi B Blok Oda:Z17, 20070 Denizli
info@cloudnesil.com
+88 (0) 101 0000 000
Certified Kubernetes Administrator Certified Developer on Apache Cassandra

CloudNesil

Docker 101

What is Docker?
  • Is a technology
  • An open-source engine
  • Automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere
  • Allow us to incorporate and store our code and its dependencies in to a neat little package -an image
  • In Java world: “Write once, run anywhere”
  • In DevOps world: “Build once, run anywhere”
What is Container and Container Image?
  • Container is a standardized unit of software
  • Container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings
  • Container images become containers when they run on Docker Engine
Keywords: Standard, Lightweight, Secure
  What is Container and Container Image?
  • “Build once, Run anywhere”
Containers Vs. VMs
  • Similar resource isolation and allocation benefits
  • Containers virtualize the operating system instead of hardware
  • Containers are more portable and efficient
  • Containers are an abstraction at the app layer
  • VMs are an abstraction of physical hardware turning one server into many servers
  • Multiple containers can run on the same machine
  • The hypervisor allows multiple VMs to run on a single machine
  • Containers take up less space than VMs(tens of MBs/tens of GBs)
  • VMs can also be slow to boot
Docker Commands & Concepts
  • Dockerfile
  • Docker Image
  • Docker registry
  • Container
  • Docker-compose
  • Swarm
  • Service
  • Stack
Docker Commands & Concepts
  • A Dockerfile is a text document
  • Contains all the commands a user call on the command line to assemble to an image
  • Demo-0
  • docker build -t kadirtaskiran/nginx:know-how .
  • Docker registry
  • docker login
  • docker images
  • docker push kadirtaskiran/nginx:know-how
Docker Commands & Concepts
  • Run the image
  • docker run -d –name know-how-nginx -p 8080:80 kadirtaskiran/nginx:know-how
  • docker ps
  • docker logs know-how-nginx
  • docker exec -it know-how-nginx /bin/sh
  • docker cp index.html know-hownginx:/usr/share/nginx/html/index.html
Docker Commands & Concepts
  • docker run -d –name know-how-nginx-2 -p 8081:80 -v /Users/kadirtaskiran/Desktop/dockerdemos/0/website_files:/website_files kitematic/hello-world-nginx
  • Change file context and see the changes
  • docker volume
  • docker network etc.
  • Kitematic
Docker Commands & Concepts
  • Docker Compose is a tool for defining and running multi-container Docker applications.
  • YAML file to configure your application’s services.
  • demo-1
  • docker-compose up -d
Docker Commands & Concepts
  • Docker Swarm Mode
  • Cluster management integrated with Docker Engine
  • Declarative service model with YAML files
  • Scaling
  • Desired state reconciliation
  • Multi-host networking
  • Service discovery
  • Load balancing
  • Rolling updates
  • https://training.play-with-docker.com/swarm-mode-intro/
     

Post a Comment

Retype the CAPTCHA code from the image
Change the CAPTCHA codeSpeak the CAPTCHA code