Official Repository

Last pushed: 22 days ago
Short Description
Ubuntu is a Debian-based Linux operating system based on free software.
Full Description

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest file (library/ubuntu). This image is updated via pull requests to the docker-library/official-images GitHub repo.

For detailed information about the virtual/transfer sizes and individual layers of each of the above supported tags, please see the repos/ubuntu/tag-details.md file in the docker-library/repo-info GitHub repo.

What is Ubuntu?

Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment. It is based on free software and named after the Southern African philosophy of ubuntu (literally, "human-ness"), which often is translated as "humanity towards others" or "the belief in a universal bond of sharing that connects all humanity".

Development of Ubuntu is led by UK-based Canonical Ltd., a company owned by South African entrepreneur Mark Shuttleworth. Canonical generates revenue through the sale of technical support and other services related to Ubuntu. The Ubuntu project is publicly committed to the principles of open-source software development; people are encouraged to use free software, study how it works, improve upon it, and distribute it.

wikipedia.org/wiki/Ubuntu_(operating_system)

What's in this image?

This image is built from official rootfs tarballs provided by Canonical (specifically, https://partner-images.canonical.com/core/).

The ubuntu:latest tag points to the "latest LTS", since that's the version recommended for general use.

Along a similar vein, the ubuntu:devel tag is an alias for whichever release the "devel" suite on the mirrors currently points to, as determined by the following one-liner: wget -qO- http://archive.ubuntu.com/ubuntu/dists/devel/Release | awk -F ': ' '$1 == "Codename" { print $2; exit }'

Locales

Given that it is a minimal install of Ubuntu, this image only includes the C, C.UTF-8, and POSIX locales by default. For most uses requiring a UTF-8 locale, C.UTF-8 is likely sufficient (-e LANG=C.UTF-8 or ENV LANG C.UTF-8).

For uses where that is not sufficient, other locales can be installed/generated via the locales package. PostgreSQL has a good example of doing so, copied below:

RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
    && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8

/etc/apt/sources.list

ubuntu:16.04

$ docker run ubuntu:16.04 grep -v '^#' /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted

deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

deb http://archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe


deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb http://archive.ubuntu.com/ubuntu/ xenial-security universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security universe

ubuntu:14.04

$ docker run ubuntu:14.04 grep -v '^#' /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted

deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted

deb http://archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe


deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe

Supported Docker versions

This image is officially supported on Docker version 17.03.1-ce.

Support for older versions (down to 1.6) is provided on a best-effort basis.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue. If the issue is related to a CVE, please check for a cve-tracker issue on the official-images repository first.

You can also reach many of the official image maintainers via the #docker-library IRC channel on Freenode.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Documentation

Documentation for this image is stored in the ubuntu/ directory of the docker-library/docs GitHub repo. Be sure to familiarize yourself with the repository's README.md file before attempting a pull request.

Docker Pull Command

Comments (79)
prasanna6358
12 days ago

can I install normal linux ubuntu apps in this docker ubuntu Image

stormshadow
2 months ago

I got Mirai warning using ubuntus 17.04 container for synology docker.

http://pastebin.com/Y3PtXqAb

woto
2 months ago

this is not working now. 2017-01-10.

it's true

woto@woto:/hdd/docker/gdeslon-docker$ docker-compose build exporter
Building exporter
Step 1 : FROM ubuntu:14.04
---> 3f755ca42730
Step 2 : ENV TERM xterm
---> Using cache
---> 3077ab16faed
Step 3 : RUN apt-get update
---> Using cache
---> 509440d726f1
Step 4 : RUN locale-gen ru_RU.UTF-8 && update-locale
---> Using cache
---> 8f570b6ff7d2
Step 5 : RUN apt-get -qq -y install wget curl git vim build-essential build-essential python-dev postgresql-client
---> Running in dffa5a9dc488
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-106.153_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'exporter' failed to build: The command '/bin/sh -c apt-get -qq -y install wget curl git vim build-essential build-essential python-dev postgresql-client' returned a non-zero code: 100

tjdahr1403
3 months ago

this is not working now. 2017-01-10.

youngh
3 months ago

when I try to run ubuntu, dock shows the below error:
docker run ubuntu:16.04
Unable to find image 'ubuntu:16.04' locally
Pulling repository docker.io/library/ubuntu
docker: Tag 16.04 not found in repository docker.io/library/ubuntu.
See 'docker run --help'.

why? who could help me?

tiredofit
3 months ago

ubuntu:16.04 and ubuntu:latest are broken.

ivochkin
3 months ago

+1 for official i386 images.

Unofficial vanilla i386 images could be found here - https://hub.docker.com/r/ivochkin/ubuntu-i386/

ibuildingsnl
3 months ago

When simply running docker run ubuntu the container immediately exits. The trick is to run it in "interactive" mode, like this: docker run -t -i ubuntu /bin/bash.

spierepf
4 months ago

Just calling $ docker run ubuntu creates a container but it exits (0) immediately. I am new to docker. What am I missing?

nirmalgupta
4 months ago

Are you planning to publish one with dirty cow patch?