
New Apt and Yum ReposDocker
New Apt and Yum ReposDocker 관련

Note
written by Jessie Frazelle (frazelledazzell
), Core Maintainer at Docker, Inc. (docker
)
TLDR;
- UPDATE your Docker apt repo source list if you want to be able to get the latest Docker
- We have a yum repo FINALLY for rpms
- 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!

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:
deb debian-wheezy main # Debian Wheezy
deb debian-jessie main # Debian Jessie
deb debian-stretch main # Debian Stretch/Sid
deb ubuntu-precise main # Ubuntu Precise
deb ubuntu-trusty main # Ubuntu Trusty
deb ubuntu-utopic main # Ubuntu Utopic
deb ubuntu-vivid main # Ubuntu Vivid
deb ubuntu-wily main # Ubuntu Wily
After your source file is updated run the following:
apt-get update
apt-get purge lxc-docker* # remove the old
apt-get install docker-engine # install the new
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
- CentOS 7 & RHEL 7
- Fedora 20
- Fedora 21
- 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 (docker/docker
)
•the code for the deb builds (docker/docker
)
•rpm builds (docker/docker
)
•deb release (docker/docker
)
•rpm release (docker/docker
)
