How to install Docker Community Edition (CE) 17.09.0 on Debian 9 (Stretch)

subject: Docker · date: 2017-12-06

  1. (Optional) If older versions of Docker are installed, uninstall them:

    $ sudo apt-get remove docker docker-engine docker.io
    
  2. Install dependent packages:

    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
    
  3. Add Docker's official GPG key:

    $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
    
  4. Set up repository:

    $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable"
    
  5. Install Docker:

    $ sudo apt-get update
    $ sudo apt-get install docker-ce
    
  6. Verify that Docker is installed correctly:

    $ sudo docker version
    Client:
     Version:      17.09.0-ce
     API version:  1.32
     Go version:   go1.8.3
     Git commit:   afdb6d4
     Built:        Tue Sep 26 22:42:09 2017
     OS/Arch:      linux/amd64
    
    Server:
     Version:      17.09.0-ce
     API version:  1.32 (minimum version 1.12)
     Go version:   go1.8.3
     Git commit:   afdb6d4
     Built:        Tue Sep 26 22:40:48 2017
     OS/Arch:      linux/amd64
     Experimental: false
    

share this article