Chapter 7. Image Distribution
Once youâve created your images, youâll want to make them available, be it to
coworkers, continuous integration servers, or end users. There are several ways
to distribute images: you can rebuild them from Dockerfiles, pull from a
registry, or use the docker load
command to install from an archive file.
In this chapter, weâll take a deeper look at the differences between these methods and explore the best ways to handle image distribution both internally in a team and externally to users. Weâll see how we can tag and upload our identidock image so that it can be used in other parts of our workflow and downloaded by others.
Tip
The code for this chapter is available at
this bookâs GitHub. The tag v0
is the code as it was at
the end of the last chapter, with later tags representing the progression of the
code through this chapter. To get this version of the code:
$ git clone -b v0 \ https://github.com/using-docker/image-dist/ ...
Alternatively, you can download the code for any tag from the Releases page on the GitHub project.
Image and Repository Naming
We saw in âWorking with Registriesâ how to tag images appropriately and upload
them to remote repositories. When distributing images, itâs very important to
use descriptive and accurate names and tags. To recap, image names and tags are
set when building the image or by using the docker tag
command:
$ cd identidock $ docker build -t "identidock:0.1" . $ docker tag "identidock:0.1" ...
Get Using Docker now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.