安装Docker
apt-get remove docker docker-engine dpkg --configure -a apt-get update apt-get -f install apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual apt-get install apt-transport-https ca-certificates curl software-properties-common apt-get update curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - apt-key fingerprint 0EBFCD88 apt-get update apt-get install docker apt-get install docker.io
执行Hello world程序
docker run hello-world
拉取镜像
docker pull ubuntu:14.04
启动容器
docker run -it ubuntu:14.04 bash docker run ubuntu:14.04 /bin/echo 'Hello World'
查看运行容器
docker ps
查看所有容器
docker ps -a
我的Github https://github.com/ZhangBohan
配置加速器
https://www.daocloud.io/mirror#accelerator-doc
拉取镜像
docker pull python:3.6
创建构建代码
mkdir composetest cd composetest/ vim app.py vim requirements.txt ls vim Dockerfile vim docker-compose.yml
安装docker-compose
apt install docker-compose
通过docker-compose启动
docker-compose up