Ubuntu Docker Installation

Source: Internet
Author: User
Tags json docker hub docker run

1.ubuntu16.04 Environment

installation command:

sudo apt-get update
sudo apt-get install Docker.io

2. Start the Docker backend service

runoob@runoob:~$ sudo service docker start
3. Mirroring Acceleration

In view of the domestic network problems, the subsequent pull Docker image is very slow, we can need to configure the accelerator to solve, I am using NetEase's Mirror address: http://hub-mirror.c.163.com.

The new Docker uses/etc/docker/daemon.json (Linux) or%programdata%\docker\config\daemon.json (Windows) to configure Daemon.

Please include in the configuration file (if you do not have the file, please build one first):

{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}


Docker Hello World

Docker allows you to run an application within a container, using the Docker Run command to run an application within the container.

Output Hello World

runoob@runoob:~$ Docker run Ubuntu:15.10/bin/echo "Hello World"
Hello World

Resolution of each parameter:

Docker:docker binary execution file.

Run: Runs a container with the previous Docker combination.

UBUNTU:15.10 Specifies the image to run, Docker first looks for the presence of the mirror from the local host, and if it does not, Docker downloads the public image from the mirrored warehouse Docker Hub.

/bin/echo "Hello World": Commands executed in the boot container

The full meaning of the above command can be interpreted as: Docker creates a new container with ubuntu15.10 image, then executes Bin/echo "Hello world" in the container and outputs the result.
Reference: http://www.runoob.com/docker/ubuntu-docker-install.html

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.