In my laptop I work mostly with LXD to have containers for development and manage LXD containers in production (integrated with Ansible).

I have one requirement to use docker/docker-compose for deployment. I know that I can install docker.io package (that have the patches for LXC compatibility) but now, Docker promote the use of Docker-CE/Docker-EE. In this case will be Docker-CE.

Do this one have the patches from the docker.io package that come in Ubuntu? or in the future the Docker-CE engine will can be deployed from the Canonical repositories or a PPA?


I know this question is old, but I believe that docker upstream has released a version that supports this now, so I thought I would just put up an answer on here. So, in Ubuntu, you really have 2 options as of 18.04 (and really these mostly work on 16.04 as well):

docker upstream archive

Currently, docker upstream recommends a more involved set of instructions installing from a custom archive, etc. This can also meet your needs as long as you grab their 17.06 and newer.

docker.io package

sudo apt install docker.io

This is versioned and updated by Canonical/Ubuntu community members quite regularly, but does tend to lag upstream a bit. You can keep this package held just like your regular apt packages on ubuntu. You can read more about the SRU exception on the Ubuntu wiki to see the quality controls that go into this. The version in Xenial and Bionic are on or approaching 17.03, but they do appear to contain the patch you need to run in LXD.

Edit note: https://github.com/docker/docker-snap - docker snap no longer recommended as of this update (25 Sep 2018). If this changes in the future, feel free to edit this answer.

| improve this answer | |
  • Very helpful - thank you! Note however that the snap restricts you somewhat: In order to use 'docker build', 'docker save' and 'docker load', you need to place your dockerfile within $HOME. All files that you want docker to access to must be within this path. Also note that currently docker.io (version 17.12.1-0ubuntu1, from about 2018-02-27) is more up-to-date than the the snap ( snapcraft.io/docker, version 17.06.2-ce, from about 2017-09-05). The custom repo from docker has docker-ce version18.03.1-ce (2018-04-26) – nealmcb Jun 22 '18 at 14:49
  • 1
    I removed the snap reference for now as it's no longer suggested/recommended. – dpb Sep 20 '18 at 8:48
  • Interesting - who says snap is no longer recommended for docker? Also, note it still says here that there are 3 options - might want to fix that too, or add snap back in and note it isn't recommended (with a cite). – nealmcb Sep 20 '18 at 12:19
  • 1
    @nealmcb updated answer with edit note. I think the snap itself still works fine, but the maintainership is in question and is not receiving updates right now. – dpb Sep 25 '18 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.