Docker

The first few steps

Docker Usecase

  • Provide an abstraction for various linux distros and underlying machines (processors) in distributed system applications - such as, microservices web-architecture, IOT apps, etc
  • It works using a spec known as 'Containers'

Containers v/s Virtualization

  • Dockers and Linux
    • Runtime is always linux
    • Windows support?
  • What is it not?
    • Virtualization
    • Configuration management
    • Deployment framework
    • Cloud services
    • Workload agent
    • Development environment

D.. Architecture

D.. workflow

...docker images are cool ...

1. layered file system

2. using tags with images for versioning and staging

D.. commands

  • docker ...
  • docker-machine ... (on osx, windows, linux)
  • sudo docker -d ... (on linux only)

 

Deprecated - boot2docker

handson .. standalone  

 

  1. Start (docker) daemon
    1. docker-machine create --driver virtualbox practice

    2. eval $(docker-machine env practice)

  2. Build image
    1. git clone https://github.com/spkane/docker-node-hello        
    2. docker build -t docker-node-hello:latest .          
  3. Run container - docker run -d -p 8080:8080 docker-node-hello:latest      
  4. Test container - docker ps
  5. Test app - curl http://localhost:8080/          

handson .. workflow

 

  1. Login to registery on laptop
  2. Build & Push docker image to registery
  3. ....... Update image on laptop
  4. ....... Build & Push docker image again
  5. Pull docker image in AWS server
  6. Run (or restart) docker image on AWS server

 

Speaker Queues: docker version, docker login, docker push, container id and name, image id and tags

lipservice .. container

 

  1. Managing container runtime ie. start/stop/auto-restart
  2. Configure containers ie. mount volume, dns, specify cpu and memory limits 
  3. Networking between containers
  4. Monitoring containers for cpu, memory, etc

Useful links

  • https://docs.docker.com/
  • https://hub.docker.com/
  • Book: Docker up & running
  • Curated Solutions: http://veggiemonk.github.io/awesome-docker/

Docker

By Naval Saini

Docker

The first few steps

  • 837