For details about how to install docker-ce and docker-compose in ubuntu,

Source: Internet
Author: User
Tags unix domain socket

For details about how to install docker-ce and docker-compose in ubuntu,
Install docker in mint 18.2 (Sonya)

Similar to ubuntu installation, refer to the ubuntu installation method provided on the official website.

Delete the original version
Sudo apt-get remove docker-engine docker. io (this step is recommended) now the default docker file system is overlay2. If you need to use aufs (the early docker File System), execute the following command
sudo apt-get updatesudo apt-get install \    linux-image-extra-$(uname -r) \    linux-image-extra-virtual
Install docker ce
Docker-ce is a Community version of docker. It is free of charge and can be installed in three ways.
Add the source, use apt-get to install and download the deb package, and use the provided script to install dpkg.
Select the first installation method to use apt-get for installation.

Install required tools,

sudo apt-get updatesudo apt-get install \    apt-transport-https \    ca-certificates \    curl \    software-properties-common

Add authentication,

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

Select the appropriate source based on your hardware architecture and add the testing machine to the amd64 architecture. docker supports amd64, armhf, and s390x. For more information about how to add other architectures, see the official website.
Run $ (lsb_release-cs) in the following command to view the system codename. The mint is based on ubuntu and uses the ubuntu software source,
Therefore

sudo add-apt-repository \   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \   $(lsb_release -cs) \   stable"

Replace with xenial and execute the following alternative command

sudo add-apt-repository \   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \   xenial \   stable"

Update Software Source

sudo apt-get update

Install the latest docker-ce version in the test environment.

sudo apt-get install docker-ce

In the official environment, you may need to install the specified version

sudo apt-get install docker-ce=
 

If no error is reported, it is a success ~
Run hello world

sudo docker run hello-world

Unable to find image 'hello-world: latest 'locally
Latest: Pulling from library/hello-world
9a0669468bf7: Pull complete

Indicates that you have obtained the image from the official repository ~

Permission problems

The installation is based on sudo or root permission. If you do not have root permission, a prompt is displayed.

Got permission denied while trying to connect to the Docker daemon socket at unix: // var/run/docker. sock: Bala

/Var/run/docker. sockFunction

It is the Unix domain socket listened by default by Docker daemon. The process in the container can communicate with the Docker daemon.

Add yourself to the docker Group

sudo usermod -a -G docker $(whoami)

Log out of the current logon user to make the change take effect.

Install docker-compose

Docker-compose is an official tool for managing images. It orchestrates images and downgrades docker commands.

Download the Binary Package, which can be obtained directly from github. refer to the following command,
Among them, 1.18.0 is the latest version by the date of publication. After the specific version is reached, click the link to query

sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Add execution permission

sudo chmod +x /usr/local/bin/docker-compose

Success

docker-compose --version# docker-compose version 1.18.0, build 8dd22a9

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.