Introducing Containers
|
Almost all software depends on other software components to function, but these components have independent evolutionary paths.
Projects involving many software components can rapidly run into a combinatoric explosion in the number of software version configurations available, yet only a subset of possible configurations actually works as desired.
Containers collect software components together and can help avoid software dependency problems.
Virtualisation is an old technology that container technology makes more practical.
Docker is just one software platform that can create containers and the resources they use.
|
Introducing the Docker command line
|
|
Exploring and Running Containers
|
The docker pull command downloads Docker images from the internet.
The docker image command lists Docker images that are (now) on your computer.
The docker run command creates running containers from images and can run commands inside them.
When using the docker run command, a container can run a default action (if it has one), a user specified action, or a shell to be used interactively.
|
Finding Containers on the Docker Hub
|
The Docker Hub is an online repository of container images.
Many Docker Hub images are public, and may be officially endorsed.
Each Docker Hub page about an image provides structured information and subheadings
Most Docker Hub pages about images contain sections that provide examples of how to use those images.
Many Docker Hub images have multiple versions, indicated by tags.
The naming convention for Docker containers is: OWNER/CONTAINER:TAG
|
Cleaning Up Containers
|
|
Creating your own container images
|
Dockerfiles specify what is within Docker images.
The docker build command is used to build an image from a Dockerfile
You can share your Docker images through the Docker Hub so that others can create Docker containers from your images.
|
Creating More Complex Container Images
|
|
Creating containers in the cloud
|
You can create Docker containers on cloud computing resources just using a web browser.
Google Cloud’s Compute Engine is an online repository storage service that can create Docker containers to perform computation on demand.
|
Containers used in generating this lesson
|
|
Containers in research workflows: reproducibility and granularity
|
Container images allow us to encapsulate the computation (and data) we have used in our research.
Using a service such as Docker Hub allows us to easily share computational work we have done.
Using container images along with a DOI service such as Zenodo allows us to capture our work and enables reproducibility.
Tools such as Docker Compose, Docker Swarm and Kubernetes allow us to describe how multiple containers work together.
|