docker--Installation of PAAs architecture

Source: Internet
Author: User

1. Overview

This document describes the installation of Docker

Reference Official Document: https://docs.docker.com/engine/installation/linux/ubuntulinux/

Install the operating system:

Ubuntu 14.04

2. Detection Prerequisites
    • Make sure Ubuntu version >=3.8

    • Make sure to install Device-mapper

  

3. Other parameter Optimization 3.1. Create a Docker user group and join the current user to the user group

sudo usermod-ag docker ubuntu

3.2. Modify the memory and account exchange mechanism

Modify the file/etc/default/grub

Set property value grub_cmdline_linux= "Cgroup_enable=memory swapaccount=1"

Update sudo update-grub

Restart reboot

3.3. Turn on the UFW function

Modified file:/etc/default/UFW

sudo nano/etc/default/UFW

Default_forward_policy= "ACCEPT"

Restart UFW function

sudo ufw reload

Allow connection to Docker port

  sudo ufw allow 2375/tcp

4. Installing Docker
    • Get Apt-key

sudo apt-get install Apt-transport-https ca-certificates

sudo apt-key adv--keyserver hkp://p80.pool.sks-keyservers.net:80--recv-keys 58118e89f3a912897c070adbf76221572c52609d

    • Create apt Warehouse file/etc/apt/sources.list.d/docker.list

Content: Deb Https://apt.dockerproject.org/repo ubuntu-trusty Main

    • Delete old Docker

sudo apt-get purge Lxc-docker

    • Update APT Warehouse

sudo apt-get update

    • Make sure the docker-engine is valid

sudo apt-cache policy docker-engine

    • Install dependent packages

sudo apt-get update

sudo apt-get install linux-image-extra-$ (uname-r)

Ubuntu 14.04 or 12.04 needs to be installedapparmor

  apt-get install apparmor

 

    • 安装docker

sudo apt-get update

sudo apt-get install Docker-engine

    • Open Docker Backend Daemon

sudo service docker start

    • Verify that Docker is installed successfully

sudo Docker run Hello-world

    • Make sure Docker is ready

Sudo Docker Info:

  

docker--Installation of PAAs architecture

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.