Docker is an open-source containerisation platform for distributed applications with the guiding principle of construct once, run anywhere. Docker is designed to be both platform and hardware agnostic, so once the Docker container is setup, it will run seamlessly whether on your laptop or the cloud.
Containerisation is a different, but similar approach to virtualisation which allows a program to be packaged into a single thing (i.e., a container) before being hosted on a server. Each container holds all the information and configuration needed to run each individual app and is fully portable between systems. Containers reduce the overhead of running several virtual machines by sharing resources between containers on the same system where it can.
This course covers the basics of Docker, starting with an introduction to containers and the idea behind the software. Then we look at installing Docker and creating our first 'Hello world' style containers. We then move onto automating this process with Dockerfiles and pushing our containers to the main Docker repository. We then look in more details at how to manage persistent data with containers and how to link containers together. After this we have a look at creating and managing our own Docker registry, rather than using the main Docker hub. This will allow companies to store their images and containers internally. Finally, we have a look at three tools that Docker are currently working on to help manage containers. Compose allows us to define one or more containers to be setup in a single file. Machine allows us to set up new virtual or cloud-based machines which we can then deploy our containers to. Finally, swarm allows for high replication services and managing clusters of machines from within Docker.
The course will be taught in a hands-on fashion. There will be some presentation and examples shown, but the majority of the time will be spent with 'hands on keyboards' having a look at what Docker is capable for yourselves.
Learners must feel comfortable with basic terminal commands in Linux
- Able to change directories
- Install new packages using apt-get or yum
- Edit files using a text editor of your choice on the command line (vim, vi, nano, emacs)
A good understanding of the concepts of source control and experience of using GIT would be useful.
Introduction to Containerisation
- Introducing Docker
- Installing Docker
- Creating containers
- Building containers from Dockerfiles
- Using the Docker hub
- Best practices
Volumes and Linking Containers
- Using volumes with containers
- Data only containers
- Linking containers internally
The Docker Registry
- Creating our own registry
- Using the registry
- Other options
- Docker compose
- Docker machine
- Docker swarm