Docker in Ubuntu, Ubuntu in Docker

We’re excited to include the following guest blog post by our friend Dustin Kirkland, Ubuntu Cloud Product Manager at Canonical

There is a design pattern, occasionally found in nature, when some of the most elegant and impressive solutions often seem so intuitive, in retrospect.

For me, Docker is just that sort of game changing, hyper-innovative technology, that, at its core,  somehow seems straightforward, beautiful, and obvious.

Linux containers, repositories of popular base images, snapshots using copy-on-write filesystem features.  Brilliant, yet so simple. for the win!

I clearly recall nine long months ago, intrigued by a fervor of HackerNews excitement pulsing around a nascent Docker technology.  I followed a set of instructions on a very well designed and tastefully manicured web page, in order to launch my first Docker container.  Something like: start with Ubuntu 13.04, downgrade the kernel, reboot, add an out-of-band package repository, install an oddly named package, import some images, perhaps debug or ignore some errors, and then launch.  In few moments, I could clearly see the beginnings of a brave new world of lightning fast, cleanly managed, incrementally saved, highly dense, operating system containers.  Ubuntu inside of Ubuntu, Inception style.  So.  Much.  Potential.

Fast forward to today — April 18, 2014 — and the combination of Docker and Ubuntu 14.04 LTS has raised the bar, introducing a new echelon of usability and convenience, and coupled with the trust and track record of enterprise grade long term support from Canonical and the Ubuntu community.  (Big thanks, by the way, to Paul Tagliamonte, upstream Debian packager of, as well as all of the early testers and users of Docker during the Ubuntu development cycle.)

Docker is now officially in Ubuntu.  That makes Ubuntu 14.04 LTS the first enterprise grade Linux distribution to ship with Docker natively packaged, continuously tested, and instantly installable.  Millions of Ubuntu servers are now never more than three commands away from launching or managing Linux container sandboxes, thanks to Docker.

sudo apt-get install
sudo pull ubuntu
sudo run -i -t ubuntu /bin/bash

And with that command, Ubuntu is now officially in Docker, on your server.  You are now inside of shell in your very own Linux container.  Brilliant, simple, elegant, user friendly.  Just the way we like things in Ubuntu, thanks to our friends at Docker.





Docker in Ubuntu, Ubuntu in Docker

26 Responses to “Docker in Ubuntu, Ubuntu in Docker”

  1. junwen38

    2014/04/19 01:45:56 dial unix /var/run/docker.sock: no such file or directory

  2. Mehdi

    Why do Ubuntu use as executable name instead of just docker? Tutorials, blog posts all now have to mention this difference, “if you use Ubuntu 14.04, or if you are with rest of the world (including earlier versions of Ubuntu)”. Why?

    • Jerome


      This is because of a Debian/Ubuntu policy; there is already a program called “docker” [1], and it was not allowed to use the same binary name. We are discussing with them to make an exception (or use one of the mechanisms allowing multiple names to co-exist), though.


      • Daniel Serodio

        Hi Jerome, any updates on this? Is the executable still named “” on Ubuntu? Thanks.

  3. Dustin Kirkland: Docker in Ubuntu, Ubuntu in Docker |

    […] article is cross-posted on Docker’s blog as […]

  4. Installing on Ubuntu 14.04LTS - Windows Azure Blog

    […] i’m running a virtual machine in Windows Azure with the prebuild image for Ubuntu 14.04LTS. When i want to install like described here: […]

  5. Michael

    It seems to be in Universe, so not supported by Canonical, nor any garantee on support or security, that’s a bit disappointing. And hasn’t RHEL 6.5 have docker as well in EPEL since a few months ? And so, the affirmation “first entreprise grade linux distribution” is a bit misleading, since that’s neither the “first” nor “entreprise grade”.

  6. Guy Baconniere

    # if you prefer docker over on Ubuntu 14.04 LTS…
    # dpkg -L | xargs grep -s ‘’

    # Create /usr/bin/docker the Debian/Ubuntu way
    # (avoid conflicting with docker – System tray)
    update-alternatives –install /usr/bin/docker docker /usr/bin/ 50

    # Allow bash completion for docker
    cp -a /etc/bash_completion.d/docker{.io,}
    sed -i ‘s/(docker).io/1/g’ /etc/bash_completion.d/docker

    # Allow zsh completion for docker
    cp -a /usr/share/zsh/vendor-completions/_docker{.io,}
    sed -i ‘s/(docker).io/1/g’ /usr/share/zsh/vendor-completions/_docker

    # the man for docker
    ln -s /usr/share/man/man1/docker{.io,}.1.gz

    # not really needed because is still available /usr/bin/
    sed -i ‘s/(docker).io/1/g’ /usr/share/*.sh

    # TODO?
    # /usr/share/lintian/overrides/
    # /usr/share/doc/

  7. Guy Baconniere

    Use docker instead of on Ubuntu 14.04 LTS

  8. Michael Stucki

    Why is the programm named “” and not just “docker” as referred to in any other tutorial? Does the package set an alias, or is it required to do so manually?

  9. Thiago Martins

    Hey guys!

    I just did on my brand new Ubuntu 14.04:

    apt-get install pull ubuntu run -i -t ubuntu /bin/bash

    But… Within the docker container, I’m seeing:

    root@22650e7d8ef1:/# lsb_release -ra
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 12.04 LTS
    Release: 12.04
    Codename: precise

    So, no Ubuntu 14.04 version within a container yet?!


  10. Thiago Martins

    Okay, got it!

    Just pushed my own Ubuntu 14.04 image do, pretty cool! 😀 run -t -i tmartinx/ubuntu-14.04-server-cloudimg /bin/bash

    Available WorldWide! 😉


  11. Dustin Kirkland: Docker in Ubuntu, Ubuntu in Docker | Hi-tech news

    […] article is cross-posted on Docker’s blog as […]

  12. orgoj in Ubuntu 14.04 is old version 0.9.1. Don’t work with ansible. I prefer install docker from repo.

  13. Bala Paranj

    This is very exciting! Can’t wait to try.

  14. Bala Paranj

    When I run : sudo pull ubuntu
    I am getting the following error message:
    2014/04/23 12:06:58 dial unix /var/run/docker.sock: no such file or directory

    How can I fix it?

  15. Hugh Acland

    I’m confused. You seem to say that docker is now native to Ubuntu 14.04 and then go on to explain how to install it?

    • Jerome


      Hi Hugh,

      “Native” means that there is an official package in the upstream Ubuntu repository; so people can install it easily. However, Ubuntu 14.04 doesn’t come out of the box with Docker pre-installed — just like it doesn’t come out of the box with all the available software; otherwise the default install would be very big (dozens of GB). Not everyone wants every program pre-installed. But “native” here means that the install is just one command away!

  16. Robert J. Berger

    When I did this I got docker version 0.9.1 and it says:

    Last stable version: 0.10.0, please update docker

    How do I update to 0.10.0?

    • Jerome


      Hi Robert,

      As I write those lines, the package for 0.10.0 is not in the official Ubuntu repositories. If you want the latest version, you can check the Docker installation guide [1], which will walk you through the steps of installing from the Docker repositories. Or, you can just wait a little bit for the Ubuntu repository to pick up the new version ! 🙂


  17. Marten Hauville

    For step by step instructuons to install Docker with Shipyard GUI in Ubuntu 14.04 LTS Trusty Tahr, take a look at my blog article:

  18. How to manage Linux containers with Docker on Ubuntu - Linux FAQ

    […] a de-facto standard for container technologies, being embraced in major Linux distros such as Ubuntu and Red […]

  19. puneet brar

    it only runs on 64 Bit version and not on 32 Bit version kinldy check before installing

  20. mohan pawar

    I tried to install but E : lxc-docker package not found. Even those commands ln and sed had not recognized by the Ubuntu 14.04 server 64-bit. Please, kindly help me to proceed. Thank you.


Leave a 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.