Ubuntu安装Docker

Ubuntu安装Docker_第1张图片
Paste_Image.png

检查版本 lsb_release -a 或者 cat /etc/issue
https://docs.docker.com/engine/installation/ubuntulinux/
ubuntu 14.04

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
touch /etc/apt/sources.list.d/docker.list
deb https://apt.dockerproject.org/repo ubuntu-trusty main
apt-get update
apt-get purge lxc-docker
apt-cache policy docker-engine

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

service docker start

docker run hello-world
docker run ubuntu:14.04 /bin/echo 'Hello world'
docker run -i -t ubuntu:14.04 /bin/bash
docker ps -a
docker images
docker start:stop:restart ID
docker attach ID
docker run -it --name lnmp centos /bin/bash
docker save busybox-1 > /home/save.tar
docker load < /home/save.tar
docker build -t <镜像名> 

你可能感兴趣的:(Ubuntu安装Docker)