Install Docker 16.04 in Ubuntu 17.12

Source: Internet
Author: User

Install Docker 16.04 in Ubuntu 17.12

Environment:

Operating System: Ubuntu 16.04.3 LTS

Docker version: 17.12.1-ce

1. Configure the IP address

Sudo vim/etc/network/interfaces

Auto ens33
Iface ens33 inet static
Address 172.16.0.100
Netmask 255.255.255.0
Gateway 172.16.0.2

2. Configure APT software source

Sudo vim/etc/apt/sources. list

Deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# Deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
Deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# Deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
Deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# Deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
Deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
Deb [arch = amd64] https://download.docker.com/linux/ubuntu xenial stable
# Deb-src [arch = amd64] https://download.docker.com/linux/ubuntu xenial stable
# Deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

3. Update APT source index

Sudo apt-get update

4. Allow APT source over HTTPS

Sudo apt-get install \
Apt-transport-https \
Ca-certificates \
Curl \
Software-properties-common

5. Add the Docker official source GPG KEY

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

6. Verify that the gpg key is successfully added.

Sudo apt-key fingerprint 0EBFCD88

7. Set the Docker to install Stable

Udo add-apt-repository \
"Deb [arch = amd64] https://download.docker.com/linux/ubuntu \
$ (Lsb_release-cs )\
Stable"

8. Update APT indexes and install Docker

Sudo apt-get update

Sudo apt-get install docker-ce

9. view the Docker version

Sudo docker version
Sudo docker -- version
Sudo docker info

10. Verify that the Docker installation is successful.

Sudo docker run hello-world

11. Start or close Docker engine

Systemctl start docker. service # start the Docker service
Systemctl status docker. service # view the Docker service status
Systemctl stop docker. service # disable the Docker service

For more Docker tutorials, see the following:

Docker installation application (CentOS 6.5_x64) https://www.bkjia.com/Linux/2014-07/104595.htm
Configuration on Ubuntu 16.04 server using Docker https://www.bkjia.com/Linux/2017-06/145176.htm
Install Docker https://www.bkjia.com/Linux/2015-07/120444.htm in Ubuntu 15.04
Docker installation instance https://www.bkjia.com/Linux/2017-04/142666.htm
Docker create basic image https://www.bkjia.com/Linux/2017-05/144112.htm
How to install Docker and basic usage https://www.bkjia.com/Linux/2015-09/122885.htm on Ubuntu 15.04
Docker Use note https://www.bkjia.com/Linux/2016-12/138490.htm on Ubuntu 16.04
Use Docker to start https://www.bkjia.com/Linux/2017-04/142649.htm of frequently used applications in minutes
Ubuntu 16.04 Docker modify configuration file does not take effect solution https://www.bkjia.com/Linux/2017-05/143862.htm

Docker details: click here
Docker: click here

This article permanently updates link: https://www.bkjia.com/Linux/2018-03/151306.htm

Related Article

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.