Docker offers two different channels in which you can preview unreleased code. This gives users a chance to review features that are both slated for release as well as features that are entirely experimental and may never make it into an actual release version. Reviewing these features and providing feedback on them is an important piece of open source software development. Docker takes the feedback it receives seriously and lots of great ideas that have been tested in these channels make it into the production code release. In this recipe, we'll review how to install both the test and the experimental Docker releases.
In this recipe, we'll be using a freshly installed Ubuntu 16.04 host. Although not a requirement, it is recommended that you install prerelease versions of Docker on a host that does not currently have Docker installed. If the installer script detects Docker is already installed, it will warn you not to install the experimental or test code. That being said, I recommend that testing of software from these channels occurs on dedicated development servers. In many cases, virtual machines are used for this purpose. If you use a virtual machine, I recommend you to install your base operating system and then snapshot the VM to give yourself a restore point. If something goes wrong with the installation, you can always revert to this snapshot to start from a known good system.
As Docker calls out in their documentation:
Experimental features are not ready for production. They are provided for test and evaluation in your sandbox environments.
Please keep this in mind when using either of the nonproduction trains of code. It is strongly encouraged that you provide feedback on GitHub on any and all features present in either channel.
As mentioned, there are two different prerelease software channels available to end users.
To install either version, you simply download the script from the URL and pass it to the shell. For instance:
As a point of interest, you can also use a similar configuration to download the production version of Docker. In addition to https://test.docker.com/ and https://experimental.docker.com/, there is also https://get.docker.com/ that will install the production release of the software.
As mentioned, the use of these scripts should be done on machines that do not currently have Docker installed. After installation, you can verify the appropriate release was installed by examining the output of docker info
. For example, when installing the experimental release, you can see the experimental flag set in the output:
user@docker-test:~$ sudo docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.12.2 …<Additional output removed for brevity>… Experimental: true Insecure Registries: 127.0.0.0/8 user@docker-test:~$
In the test or RC version, you'll see similar output; however, there will not be an experimental variable listed in the output of Docker info:
user@docker-test:~$ sudo docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.2-rc3
…<Additional output removed for brevity>…
Insecure Registries:
127.0.0.0/8
user@docker-test:~$
After installation via the script, you should find that Docker is installed and running just as if you had installed Docker through your operating systems default package manager. While the script should prompt you toward the end of the installation, it is advisable to add your user account to the Docker group. This prevents you from having to escalate your privileges with sudo
to use the Docker CLI commands. To add your user account to the Docker group, use this command:
user@docker-test:~$ sudo usermod -aG docker <your username>
Make sure that you log off and back in for the setting to take effect.
Keep in mind that these scripts can also be used to update to latest version of either channel. In those scenarios, the script will still prompt you about the possibility of installing over an existing Docker installation, but it will provide verbiage to indicate that you can ignore the message:
user@docker-test:~$ curl -sSL https://test.docker.com/ | sh Warning: the "docker" command appears to already exist on this system. If you already have Docker installed, this script can cause trouble, which is why we're displaying this warning and provide the opportunity to cancel the installation. If you installed the current Docker package using this script and are using it again to update Docker, you can safely ignore this message. You may press Ctrl+C now to abort this script. + sleep 20
Although this is not the only way to get the test and experimental code, it is certainly the easiest. You may also download the prebuilt binaries or build the binary yourself. Information on how to do both is available on Docker's GitHub page at https://github.com/docker/docker/tree/master/experimental.