码迷,mamicode.com
首页 > 系统相关 > 详细

How to install Docker on Ubuntu

时间:2018-10-06 17:53:14      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:download   3.1   existing   require   sudo   process   lin   https   which   

Docker currently only runs on 64-bits platforms and requires that the kernal version be no less than 3.10.
in this tutorial , i use ubuntu 16.04 and the kernal version is 4.13.0-43-generic
you can use this command to find your linux-version and linux-kernal version.

uname -a 
cat /proc/version

At the first , you need to update your existing list of packages:

sudo apt update

Second, you need to install a few prerequisite packages which let apt use packages over HTTPS

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

add the GPG key for the official Docker repository to your system:

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

Add the Docker repository to APT sources:

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

update the package database with the Docker packages from the newly added repo:

sudo apt-get update

After you can install Docker

sudo  apt-get install docker-ce

if you have error on apt-get like this :
技术分享图片
you can use this command to find the process using apt , and kill it !

ps aux | grep apt

技术分享图片
after that , how can you check that docker is installed ?
you can use this command to chek

sudo service docker start 
docker version

技术分享图片

Reference:
https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process

How to install Docker on Ubuntu

标签:download   3.1   existing   require   sudo   process   lin   https   which   

原文地址:http://blog.51cto.com/12098022/2294095

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!