Install the latest docker in ubuntu 16.04, 16.04 docker

Source: Internet
Author: User

Install the latest docker in ubuntu 16.04, 16.04 docker

This article describes how to install and upgrade docker, docker-compose, and docker-machine in ubuntu16.04.

Docker: there are two versions: docker-ce (Community edition) and docker-ee (Enterprise Edition ).

The latest version of docker-ce (Community version) is introduced here ).

Docker-compse: you can run and manage multiple docker containers.

Docker-machine: a docker management tool officially provided by docker. You can manage multiple docker hosts and build a swarm cluster.

1. Install docker 1. Uninstall the old version of docker

This step is not required for completely new installation.

$ sudo apt-get remove docker docker-engine docker.io
2. Update System Software
$ sudo apt-get update
3. Install the dependency package
$ sudo apt-get install \    apt-transport-https \    ca-certificates \    curl \    software-properties-common
4. Add an official key

When you run this command, if you haven't responded for a long time, it means that the network cannot connect to the docker website, you need to use proxy.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

OK is displayed, indicating that the add operation is successful.

5. Add a repository
$ sudo add-apt-repository \   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \   $(lsb_release -cs) \   stable"
6. Update the software again.

After practice, this step cannot be omitted. We need to update the software to the latest version. Otherwise, an error may be reported in the next step.

$ sudo apt-get update
7. Install docker

To install a specific version, use sudo apt-get install docker-ce = Command Replace it with a specific version.

If no version is specified in the following command, the latest version is installed by default.

$ sudo apt-get install docker-ce
8. view the docker version.
$ docker -v

"Docker version 172.169.0-ce, build afdb6d4" is displayed, indicating that the installation is successful.

2. Install docker-compose 1 and download docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
2. Authorization
$ sudo chmod +x /usr/local/bin/docker-compose
3. View version information
$ docker-compose --version

The published information is displayed, indicating that the installation is successful.

3. Install docker-machine

Note: The use of docker-machine is based on virtualBox. If you have not installed virtualBox, first install virtualBox.

1. Install virtualBox

Find "Ubuntu 16.04 (" Xenial ") i386 | AMD64" and click "AMD64" to download it.

After the download, run the following command to install:

$ sudo dpkg -i virtualbox-5.2_5.2.0-118431_Ubuntu_xenial_amd64.deb
2. Download and install docker-machine
$ curl -L https://github.com/docker/machine/releases/download/v0.13.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&chmod +x /tmp/docker-machine &&sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
3. View version information
$ docker-machine version

The published information is displayed, indicating that the installation is successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.