New Apt and Yum Repos

Jessie Frazelle

Jul 22 2015

written by Jessie Frazelle, Core Maintainer at Docker, Inc.


  1. UPDATE your Docker apt repo source list if you want to be able to get the latest Docker
  2. We have a yum repo FINALLY for rpms

Today, we are super excited to announce that we have created and deployed new apt and yum repos for installing Docker. No longer will you apt-get install lxc-docker, a super confusing name considering we no longer use lxc as the default backend for Docker out of the box. Let’s take a deep dive into the awesomeness that is the new repos.

Dynamic Binaries

The old Docker deb installed a fully static Docker binary. This was the simplest way to make Docker installable on a variety of different OS versions without having to deal with dependencies. For those who use Devicemapper as a storage driver, this will allow udev sync to work properly.

Well now everyone gets a dynamic binary!



Updating Apt Sources

We urge everyone to update their apt sources to the new format. We will NOT be pushing new versions to the old apt repository.
We decided not to support two distinct apt repositories forever, hopefully you can understand this decision.

Docker 1.7.1 is already available on the new apt repository, which will ensure a seamless migration.

# add the new gpg key
$ apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

# edit your /etc/apt/sources.list.d/docker.list
$ vim /etc/apt/sources.list.d/docker.list

# remove the contents and replace with the following depending on your os and version:

# Debian Wheezy
deb debian-wheezy main

# Debian Jessie
deb debian-jessie main

# Debian Stretch/Sid
deb debian-stretch main

# Ubuntu Precise
deb ubuntu-precise main

# Ubuntu Trusty
deb ubuntu-trusty main

# Ubuntu Utopic
deb ubuntu-utopic main

# Ubuntu Vivid
deb ubuntu-vivid main

# Ubuntu Wily
deb ubuntu-wily main

After your source file is updated run the following:

$ apt-get update
# remove the old
$ apt-get purge lxc-docker*
# install the new
$ apt-get install docker-engine


Now you are all set. When you run apt-get upgrade in the future it will hit the new apt repo.


RPMs and Yum

A huge pain point for people using CentOS, Fedora, or RHEL was having to install the package for docker that is maintained by the distribution itself. Not that there was anything wrong with those packages, but now you can rest assured you will get the latest, greatest Docker installed on your host from our yum repository.

You can easily add our yum repository and install the new docker-engine package by running:

$ curl -sSL | sh


OR if you would like to add it yourself find the url for your specific OS version below and run the following script:

CentOS 6 & RHEL 6:

CentOS 7 & RHEL 7:

Fedora 20:

Fedora 21:

Fedora 22:


# replace$OS/$OS_VERSION below with your specific OS versions url from above
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
name=Docker Repository

$ yum install docker-engine


How It All Works

The new repos have versions for all different Debian, Ubuntu, Fedora, CentOS, and Oracle Linux distros. You’re probably thinking: ‘that is a lot of debs and rpms to maintain’. It is, but we made it as simple as possible by using Docker to build them.

Each rpm and deb is built inside a Docker container that’s base is the specific distro version. It’s super convenient and a great way to also always be testing Docker.

If you are interested in the actual code used for this, check out:

the Dockerfiles for these images
• the code for the deb builds
• rpm builds
• deb release
• rpm release



 Learn More about Docker



43 thoughts on “New Apt and Yum Repos

  1. This is good news. A tidier name indeed.

    BTW: I noticed the way that lots of documentation gives to install:

    curl -sSL | sudo sh

    Still has `apt-get install -y lxc-docker` in the script. I assume this will be updated soon.

  2. That script should not be used. It was purposely not mentioned. see:

  3. Is Ubuntu Saucy no longer supported?

  4. All my conf stored in /etc/default/docker was crunched…

  5. Avatar

    Paolo Antinori

    Hi, I have installed `docker-engine` on Fedora 22 and I think `/usr/lib/systemd/system/docker.service` lacks `EnvironmentFile=-/etc/sysconfig/docker (ignore_errors=yes)` entry.

  6. It’s a shame that it depends on SystemD, which is not available on Amazon Linux. Will there be specific packages for this OS?

  7. Since I work behind a filtering proxy, apt-key fails as documented in the installation section for Ubuntu. The work around that references should now be

    i.e. $ wget -qO- | sudo apt-key add –

    Once I discovered that everything worked great!

  8. Avatar

    Gustavo Narea

    Here’s a Bash script that automates the migration in all versions of Ubuntu:

  9. Do the new repositories support experimental releases?

  10. Getting a 403 on Debian Wheezy

    ~#: apt-key adv –keyserver hkp:// –recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /tmp/tmp.WFwrYeGTcJ –trustdb-name /etc/apt//trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-automatic.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-security-automatic.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-stable.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-squeeze-automatic.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-squeeze-stable.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-wheezy-automatic.gpg –keyring /etc/apt/trusted.gpg.d//debian-archive-wheezy-stable.gpg –keyserver hkp:// –recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    gpg: requesting key 2C52609D from hkp server
    gpg: key 2C52609D: public key “Docker Release Tool (releasedocker) ” imported
    gpg: Total number processed: 1
    gpg: imported: 1 (RSA: 1)
    ~# apt-get update
    Ign debian-wheezy Release.gpg
    Ign debian-wheezy Release
    Err debian-wheezy/main amd64 Packages
    The requested URL returned error: 403

  11. Avatar

    Docker Learner

    Does Docker has any plans to officially maintain Snappy package as well? Searching in Snappy Ubuntu repository for Docker gives version 1.6.1 for quite some time.

  12. Avatar

    Jeff Thompson

    Thank you, this is good news.

  13. So does this replace the existing `` debian package at ?

  14. Hello. It appears the repo for Ubuntu 14.04 is broken as well. I have tried multiple different methods today but the apt-repo just doesn’t work. Here’s a sample of my output:

    STDERR: W: Failed to fetch Unable to find expected entry ‘main/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

    Here is the content of my /etc/apt/sources.list.d/docker.list file:

    # cat /etc/apt/sources.list.d/docker.list
    deb ubuntu-trusty main
    deb-src ubuntu-trusty main

    # Here’s the Chef code I’m using to install this (I have tried manually and watched it fail too):

    include_recipe ‘apt’

    apt_repository ‘docker’ do
    uri ‘’
    distribution “ubuntu-trusty” # <== I have also tried just ubuntu, and also #{node['lsb']['codename']}
    components %w(main)
    deb_src true
    keyserver 'hkp://'
    key '2C52609D'

    execute "apt-get update"

    package "docker-engine" do
    action :install

    • Avatar

      Isaac Stefanek

      You need to force apt-get update to run after adding the new repository and before running the install.

      The following is working for me:
      apt_repository ‘docker’ do
      uri ‘’
      components [‘main’]
      distribution ‘ubuntu-trusty’
      key ‘58118E89F3A912897C070ADBF76221572C52609D’
      keyserver ‘hkp://’
      action :add
      deb_src false
      notifies :run, ‘execute[apt-get-update]’, :immediately

      execute “apt-get-update” do
      command “apt-get update”
      action :nothing

      package ‘docker-engine’ do
      action :install

  15. Are compose, machine and swarm going to be added to the repos?

  16. Would really love to see old versions of packages added to this repo. docker-engine-1.7.1 is the only version of docker currently available from the new repo, but it has a gamebreaking bug for us (

    • Ditto on keeping older versions; Debian just updated to 1.8.0 an hour ago or so but Ubuntu is still at 1.7.1 so now if I was to bring different boxes up they’d have to have different versions. The files are still here why not leave them in the Packages file so people can stay on a given version for at least a little while?

    • +1 !
      Only the latest version of the package are linked from the repo package file, while the older files are still available but not referenced in any way. Why simply not referencing these old ones ?

  17. It would be nice to abel to install specific versions of docker.
    Since the update to 1.8.0 the command:
    apt-get install docker-engine=1.7.1~trusty
    gives the error:
    E: Version ‘1.7.1-0~trusty’ for ‘docker-engine’ was not found
    Other versions are also not mentioned in the Packages file of the repo but the deb files for the old versions still exist.

  18. I’ve just upgraded in Fedora 22 and it’s working fine here. I don’t know exactly if it is really required, but I preferred to manually remove the old packages from 1.7.X version with:
    $ sudo dnf remove docker-engine
    And then, upgrade the Docker Repo info and download the newer version.
    $ sudo dnf clean all && sudo dnf repolist && sudo dnf install docker-engine

  19. I think yesterday’s update has just wiped my `/etc/sysconfig/docker` on Fedora. Not nice.

  20. sudo apt-key adv –keyserver –recv-keys F76221572C52609D

  21. Jessie it is excellent but ….
    apt-get purge lxc-docker* will remove all your previous config and it can be a pain to recreate it.
    Please include a backup in your procedure.

  22. i had a keyserver error until i changed my keyserver to . coming from ubuntu 14.04

  23. For people having apt update issue “The requested URL returned error: 403”, try to use http instead of https.

    deb debian-wheezy main

  24. The latest version in the repo is 1.7 while the lastes version of the docker is 1.10. Is there any way to achieve the RPM file of the 1.10? or I have to build it from source?

  25. Why you do not include other packages like docker-compose in the repos ?

Leave a Reply