Skip to content

Instantly share code, notes, and snippets.

@bndw
Last active November 9, 2023 13:40
Show Gist options
  • Save bndw/987eb66a10f6fb82446cb7bcadd1306e to your computer and use it in GitHub Desktop.
Save bndw/987eb66a10f6fb82446cb7bcadd1306e to your computer and use it in GitHub Desktop.
How to install an older version of Docker on Debian

How to install an older Docker version

These instructions are only tested on installations that use the Docker apt repository.

  1. Remove the existing installation

    sudo apt-get remove docker-engine
  2. List the available versions

    sudo apt-cache showpkg docker-engine
    
    ...
    
    Provides:
    1.11.1-0~jessie -
    1.11.0-0~jessie -
    1.10.3-0~jessie -
    1.10.2-0~jessie -
    1.10.1-0~jessie -
    1.10.0-0~jessie -
    1.9.1-0~jessie -
    1.9.0-0~jessie -
    1.8.3-0~jessie -
    1.8.2-0~jessie -
    1.8.1-0~jessie -
    1.8.0-0~jessie -
    1.7.1-0~jessie -
    1.7.0-0~jessie -
    1.6.2-0~jessie -
    1.6.1-0~jessie -
    1.6.0-0~jessie -
    1.5.0-0~jessie -
  3. Install an available version, in this case 1.9.1

    sudo apt-get install docker-engine=1.9.1-0~jessie
  4. Verify the install

    docker version
    
    Client:
     Version:      1.9.1
     API version:  1.21
     Go version:   go1.4.2
     Git commit:   a34a1d5
     Built:        Fri Nov 20 12:59:02 UTC 2015
     OS/Arch:      linux/amd64
    
    Server:
     Version:      1.9.1
     API version:  1.21
     Go version:   go1.4.2
     Git commit:   a34a1d5
     Built:        Fri Nov 20 12:59:02 UTC 2015
     OS/Arch:      linux/amd64
@haboustak
Copy link

Nothing is ever lost on the internet. A search for an old docker-engine debian package name (docker-engine_1.9.1-0-jessie_amd64.deb) has turned up a mirror.

# apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# echo "deb http://mirrors.aliyun.com/docker-engine/apt/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list
# apt-get update
# apt-cache madison docker-engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment