How to install Docker on Ubuntu

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

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

时间: 2024-08-09 07:46:09

How to install Docker on Ubuntu的相关文章

How To Install Docker On Ubuntu 18.04

Docker is an increasingly popular software package that creates a container for application development. Developing in Docker speeds up applications, as it shares the kernel and other resources, instead of requiring dedicated resources. There are two

Install Docker on Ubuntu

目前支持的 Ubuntu 版本: Ubuntu Xenial 16.04 (LTS) Ubuntu Wily 15.10 Ubuntu Trusty 14.04 (LTS) Ubuntu Precise 12.04 (LTS) Prerequisites 内核版本不能低于 3.10 $ uname -r 3.11.0-15-generic 如果之前使用 APT 安装过 Docker,需确保更新 APT 源至新的 Docker repository. Update your apt sources

Install Docker in Ubuntu 16.04 LTS

add key sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D add sources sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' update apt update install a

Ubuntu install Docker

首先需要说明的是,根据Docker的官方文档,Docker的安装必须在64位的机子上.这里只说明Ubuntu 14.04与16.04,我成功安装成功过Ubuntu 14.04,16.04还没有测试过,若为Ubuntu 12.04参考官方文档. 官方文档地址:https://docs.docker.com/engine/installation/linux/ubuntulinux/ 建议先按照官方文档步骤安装,若读不懂可以参考我写的,有问题请给我留言 -----------------------

Docker的ubuntu镜像安装的容器无ifconfig和ping命令的解决

Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令 解决: apt-get update apt install net-tools       # ifconfig apt install iputils-ping     # ping

Install Docker on Mac OS X(转)

Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your command-line. Choose this installation if you are familiar with the command-line or plan to contribute to the Docker project on GitHub. Alternatively,

docker 搭建ubuntu+mysql环境教程

Docker 是一个开源的应用容器引擎,让开发者可以打包他们的 应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制, 相互之间不会有任何接口. 实验目的:在centos6.5中运用docker,初步了解docker创建过程, 创建ubuntu及mysql镜像 并将其发布出去并测试,体验docker工作原理 一:查看当前linux内核版本,docker需要内核3.X uname -a 查看内核版本,如果小于3.X需要升级内核 内核

Docker在Ubuntu的部署实践

Docker在Ubuntu的部署实践 作者:chszs,版权所有,未经同意,不得转载.博主主页:http://blog.csdn.net/chszs 本文讲述Docker在Ubuntu系统上的部署过程.其中,Ubuntu为12.04.5 LTS, Precise Pangolin版. 1.安装Docker # apt-get update # apt-get install docker.io Reading package lists... Done Building dependency t

centos Install Docker

安装必备软件 yum -y install iptables  iptables-services net-tools vim wget 安装Dockeryum -y install docker 下载centos镜像docker pull centos 查看centos 镜像docker images centos 运行一个Docker容器docker run -i -t centos /bin/bash 搜索Ubuntu镜像docker search Ubuntu 显示正在运行的容器(需要先