deb http://mirrors.aliyun.com/ubuntu/ cosmic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ cosmic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ cosmic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ cosmic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ cosmic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ cosmic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ cosmic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ cosmic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ cosmic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ cosmic-backports main restricted universe multiverse sudo sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list运行
docker run ubuntu:18.04 /bin/echo "Hello world" docker run -i -t ubuntu:15.10 /bin/bash docker container prune docker ps docker ps -a docker run -d -P training/webapp python app.py docker run -d -p 5000:5000 training/webapp python app.py docker port docker exec -it 243c32535da7 /bin/bashimage
docker export 1e560fca3906 > ubuntu.tar cat docker/ubuntu.tar | docker import - test/ubuntu:v1 $ docker import http://example.com/exampleimage.tgz example/imagerepo docker logs -f bf08b7f2cd89 docker top wizardly_chandrasekhar docker commit -m="has update" -a="runoob" e218edb10161 runoob/ubuntu:v2 也可以创建image #docker commit -m="has update" -a="runoob" e218edb10161 这种默认是latest #根据当前已有的镜像生成新的 docker tag sourceImage:tag targetImage:tag #查看当前容器的信息可以看到用的那个image docker inspect containerId #查看image的详情 docker image inspect image云
sudo docker login --username=username registry.cn-hangzhou.aliyuncs.com docker tag ubuntu:18.04 username/ubuntu:18.04 上传到阿里云 https://blog.csdn.net/u010739551/article/details/81536503 https://blog.51cto.com/11342825/2419035 docker commit -m="for aliyun" -a="gaolipeng" test3 registry.cn-hangzhou.aliyuncs.com/username/ubuntu:18.04 sha256:ef08bb0e5d17bcf93bc9f1e9ae60b96932dcec86e767dd2a23cdfcd9e09d7f6b docker push registry.cn-hangzhou.aliyuncs.com/username/ubuntu:18.04
杀死运行的容器: docker kill $(docker ps -a -q)
删除所有容器: docker rm $(docker ps -a -q)
强制删除所有镜像: docker rmi -f $(docker images -q)



