How to install Docker on Ubuntu 17.04

Docker hasn't setup a repository for the latest ubuntu, but that's an easy fix because their release for ubuntu 16 is compatible. For the time being, just edit /etc/apt/sources.list and on the line:

deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable

Replace zesty by xenial. Run sudo apt-get update and you can proceed with sudo apt-get install docker-ce


Just a quick note: Currently to install docker-ce on ubuntu 17.04 (zesty) you need to be on the edge channel: see https://github.com/moby/moby/issues/32423#issuecomment-300164496

Therefore you need to add deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty edge to your sources.


The information in this thready is outdated and can result in malfunctioning docker installation; ubuntu zesty is now supported, and packages are available; see the installation manual: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

Uninstall old versions

Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them:

$ sudo apt-get remove docker docker-engine docker.io

Automated Installation

If you want all the installation steps to be done "automatically", you can also use the installation script at https://get.docker.com/

Install Using the Repository

Update the apt package index:

$ sudo apt-get update

Install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.

$ sudo apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <[email protected]>
sub   4096R/F273FCD8 2017-02-22

Use the following command to set up the stable repository (for the amd64 architecture):

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

INSTALL DOCKER CE

$ sudo apt-get update
$ sudo apt-get install docker-ce

Thanks Sebastiaan van Stijn for helping me with this.

Tags:

Docker

17.04