New Apt and Yum Repos

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

TLDR;

  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
  3. EVERYONE GETS A DYNAMIC BINARY

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!

oprah_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://p80.pool.sks-keyservers.net:80 --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 https://apt.dockerproject.org/repo debian-wheezy main

# Debian Jessie
deb https://apt.dockerproject.org/repo debian-jessie main

# Debian Stretch/Sid
deb https://apt.dockerproject.org/repo debian-stretch main

# Ubuntu Precise
deb https://apt.dockerproject.org/repo ubuntu-precise main

# Ubuntu Trusty
deb https://apt.dockerproject.org/repo ubuntu-trusty main

# Ubuntu Utopic
deb https://apt.dockerproject.org/repo ubuntu-utopic main

# Ubuntu Vivid
deb https://apt.dockerproject.org/repo ubuntu-vivid main

# Ubuntu Wily
deb https://apt.dockerproject.org/repo 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 https://get.docker.com/ | 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: https://yum.dockerproject.org/repo/main/centos/6

CentOS 7 & RHEL 7: https://yum.dockerproject.org/repo/main/centos/7

Fedora 20: https://yum.dockerproject.org/repo/main/fedora/20

Fedora 21: https://yum.dockerproject.org/repo/main/fedora/21

Fedora 22: https://yum.dockerproject.org/repo/main/fedora/22

 

# replace https://yum.dockerproject.org/repo/main/$OS/$OS_VERSION below with your specific OS versions url from above
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/$OS/$OS_VERSION
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

$ 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

 

, , , , , ,

New Apt and Yum Repos


43 Responses to “New Apt and Yum Repos”

  1. Tom Fotherby

    This is good news. A tidier name indeed.

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

    curl -sSL https://get.docker.io/ubuntu/ | sudo sh

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

    Reply
  2. Jessie

    That script should not be used. It was purposely not mentioned. see: https://github.com/docker/docker/pull/14920

    Reply
  3. Mike

    Is Ubuntu Saucy no longer supported?

    Reply
  4. manu

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

    Reply
  5. 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.

    Reply
  6. André Cruz

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

    Reply
  7. Don Hunt

    Since I work behind a filtering proxy, apt-key fails as documented in the installation section for Ubuntu. The work around that references https://get.docker.com/gpg should now be https://apt.dockerproject.org/gpg.

    i.e. $ wget -qO- https://apt.dockerproject.org/gpg | sudo apt-key add –

    Once I discovered that everything worked great!

    Reply
  8. Gustavo Narea

    Here’s a Bash script that automates the migration in all versions of Ubuntu: http://pastebin.com/KRxKwtEr

    Reply
  9. Ross Cousens

    Do the new repositories support experimental releases?

    Reply
  10. Pieter

    Getting a 403 on Debian Wheezy

    ~#: apt-key adv –keyserver hkp://p80.pool.sks-keyservers.net:80 –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://p80.pool.sks-keyservers.net:80 –recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
    gpg: key 2C52609D: public key “Docker Release Tool (releasedocker) ” imported
    gpg: Total number processed: 1
    gpg: imported: 1 (RSA: 1)
    ~# apt-get update
    Ign https://apt.dockerproject.org debian-wheezy Release.gpg
    Ign https://apt.dockerproject.org debian-wheezy Release
    Err https://apt.dockerproject.org debian-wheezy/main amd64 Packages
    The requested URL returned error: 403

    Reply
  11. 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.

    Reply
  12. Jeff Thompson

    Thank you, this is good news.

    Reply
  13. Jason Harmon

    So does this replace the existing `docker.io` debian package at
    https://docs.docker.com/installation/debian/ ?

    Reply
  14. Kris Law

    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 https://apt.dockerproject.org/repo/dists/ubuntu-trusty/Release 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 https://apt.dockerproject.org/repo ubuntu-trusty main
    deb-src https://apt.dockerproject.org/repo 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 ‘https://apt.dockerproject.org/repo’
    distribution “ubuntu-trusty” # <== I have also tried just ubuntu, and also #{node['lsb']['codename']}
    components %w(main)
    deb_src true
    keyserver 'hkp://p80.pool.sks-keyservers.net'
    key '2C52609D'
    end

    execute "apt-get update"

    package "docker-engine" do
    action :install
    end

    Reply
    • Isaac Stefanek

      Kris,
      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 ‘https://apt.dockerproject.org/repo’
      components [‘main’]
      distribution ‘ubuntu-trusty’
      key ‘58118E89F3A912897C070ADBF76221572C52609D’
      keyserver ‘hkp://p80.pool.sks-keyservers.net:80’
      action :add
      deb_src false
      notifies :run, ‘execute[apt-get-update]’, :immediately
      end

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

      package ‘docker-engine’ do
      action :install
      end

      Reply
      • S3hh

        No, Kris' problem was that this repo doesn't have source packages. I wonder why that is 🙁

        Reply
  15. kjr

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

    Reply
  16. Vincent

    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 (https://github.com/docker/docker/issues/14738).

    Reply
    • Peter

      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 http://apt.dockerproject.org/repo/pool/main/d/docker-engine/ why not leave them in the Packages file so people can stay on a given version for at least a little while?

      Reply
    • Eric

      +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 ?

      Reply
  17. Mike

    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.

    Reply
  18. Sergio

    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

    Reply
  19. Paolo Antinori

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

    Reply
  20. Narendra

    sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys F76221572C52609D

    Reply
  21. rastafarien

    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.
    Thanks

    Reply
  22. corey

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

    Reply
  23. Paolo

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

    deb http://apt.dockerproject.org/repo debian-wheezy main

    Reply
  24. garethr/garethr-docker | GITROOM

    […] recently launched new official repositories which are now the default for the module from version 5. If you want to stick with the old […]

    Reply
  25. mahmood

    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?

    Reply
  26. PtitPoulpe

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

    Reply

Leave a Reply to mahmood

Click here to cancel reply.

Get the Latest Docker News by Email

Docker Weekly is a newsletter with the latest content on Docker and the agenda for the upcoming weeks.