Skip to content

Instantly share code, notes, and snippets.

@jasonbrooks
Last active January 20, 2019 18:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonbrooks/4b209167575d0d37f757f7ec4f2c2cf1 to your computer and use it in GitHub Desktop.
Save jasonbrooks/4b209167575d0d37f757f7ec4f2c2cf1 to your computer and use it in GitHub Desktop.

Fedora Atomic Host comes bundled with a version of Docker based on this project atomic repo that moves no faster than the upstream kubernetes project can abide. This means that Fedora Atomic pretty much always ships with an older version of docker than what's available from Docker Inc.

However, through the magic of rpm-ostree package layering, you can replace that older, baked-in docker with the very latest docker-ce. Here's how:

First, grab the repo file for docker-ce.

# cd /etc/yum.repos.d/
# curl -O https://download.docker.com/linux/fedora/docker-ce.repo

Then create a config file to tell docker-ce to use overlay2 storage.

# vi /etc/docker/daemon.json

{
  "storage-driver": "overlay2"
}

Then, use rpm-ostree ex override to remove docker and kubernetes from the image, and use rpm-ostree install to layer on docker-ce from the configured repo.

# rpm-ostree ex override remove docker docker-common kubernetes kubernetes-node cockpit-docker
# rpm-ostree install docker-ce -r

After the reboot, you'll have the latest docker-ce installed. Knock yourself out with any number of bleeding-edge features!

# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.09.0-ce
Storage Driver: overlay2
...
@grugnog
Copy link

grugnog commented Jul 23, 2018

This worked for me - thanks!
I needed to remove a few additional packages: rpm-ostree override remove docker docker-common cockpit-docker docker-client docker-client-latest docker-latest docker-lvm-plugin docker-novolume-plugin kubernetes-node
I also needed to specify the version number in docker-ce.repo as yum was not providing this value.

@cybercussion
Copy link

f28 is throwing a error -

Resolving dependencies... failed
error: Could not depsolve transaction; 1 problem detected:
0. nothing provides libltdl.so.7()(64bit) needed by docker-ce-18.03.1.ce-3.fc28.x86_64

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