NOTE: This is based on testing with Docker 1.2 with fig 1.0.1. Please let me know if it has been fixed.
In my previous post I discussed the FROM instruction inside a Dockerfile and the :latest tag. This highlights a deeper problem with Docker, the :latest tag and it’s use with docker pull. Highlighted in a github issue, docker pull and the FROM instructions have different behaviours. While inside a Dockerfile, FROM will assume :latest where as docker pull will assume you mean everything.
This appeared to be fixed in an accepted pull request:
However looked at the master branch of the client I cannot see any code to handle the scenario of not including a tag with the docker pull command.
As a result, when you enter
docker pull node, instead of downloading just the latest version as you generally require you will download every node version available.
Surprisingly the Registry itself encourages you to download every tag instead of the latest.
Likewise with fig, a tool to help manage running containers. Without defining a tag it will pull all tags in order to bring up the image.
This is a very common mistake and it’s easy to see why sometimes it feels like Docker is downloading the entire internet when you only wanted a single version. It’s important to include a tag when pulling a docker image to save you downloading the internet.