2. What is Docker?
Sources here.
• Docker is an engine that sits between the OS and the containers.
• It’s not a hypervisor although there are similarities.
• It allows for Rapid Application Deployment….. As long as time is invested in making the image!
• Containers are created from images, everything starts with an image.
3. Docker is not a hypervisor
Think of a Container as a VM and you’ll have trouble getting it to work.
Containers need a process “grabbing” the foreground to keep the container running, Otherwise….
4. Docker works on Layers
Config files/HTML files
Yum Update -y
Apache Web Server
CentOS base
Read-only container layers
Thin read-write layer
5. The Dockerfile builds the image
• Dockerfile is a directive language that creates the layers
• Store your dockfilers as you can’t reverse engineer them out of a container easily
6. Containers get deployed from images
• Docker run –d –p [ports] image
• That’s it, if the image is good, you’ll have a working container.
• Images can be pulled from repositories/registries.
7. Containers are stateless
• Stop a container and your data is gone
• Containers must be considered temporary/disposable
• How do you get stateful data into a container? Lots of ways!
The story:
I got into Docker because of issues around some upgrades. These were largely web server upgrades that sat on top of dependencies like Elastic Search, mongodb and so on.
All too often a request would come in to upgrade the front end and this would work in that the front end would upgrade but then it wouldn’t be able to talk to elastic search because they needed upgrading. While Docker doesn’t fix compability issues it does allow for very rapid deployment to test out such issue and more importantly, easy rollback
Docker stop [container]
Docker start [old container]
In fact, the ability for different vesions to co-exist on the same host may well be one of dockers top strengths.
Rapid Application deployment – a 90’s time that has now arrived!
Talk about the exit status – why is this a problem and why is it not a problem?
Explain why containerisation isn’t a hypervisor
Grouping layers to create a base image can make deployments even faster.
Talk about two lines to deploy a web server
Photon OS, used to run Vcentre 6.5.
Lightweight but very optimised distro