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
-
Start (docker) daemon
-
docker-machine create --driver virtualbox practice
-
eval $(docker-machine env practice)
-
-
Build image
- git clone https://github.com/spkane/docker-node-hello
- docker build -t docker-node-hello:latest .
- Run container - docker run -d -p 8080:8080 docker-node-hello:latest
- Test container - docker ps
- Test app - curl http://localhost:8080/
handson .. workflow
- Login to registery on laptop
- Build & Push docker image to registery
- ....... Update image on laptop
- ....... Build & Push docker image again
- Pull docker image in AWS server
- 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
- Managing container runtime ie. start/stop/auto-restart
- Configure containers ie. mount volume, dns, specify cpu and memory limits
- Networking between containers
- 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