centos docker community version install:
yum -y install docker         # install docker
systemctl start docker.service               # start docker service
systemctl enable docker.service       # enale docker service when power on
docker run hello-world  # need to pull from docker repository the first time docker container:
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -d -p 4000:80 friendlyname # detached mode,4000(image) 80(localhost)
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
docker container rm <hash> # Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers
docker image ls -a # List all images on this machine
docker image rm <image id> # Remove specified image from this machine
docker image rm $(docker image ls -a -q) # Remove all images from this machine
docker login # Log in this CLI session using your Docker credentials
docker tag <image> username/repository:tag # Tag <image> for upload to registry
docker push username/repository:tag # Upload tagged image to registry
docker run username/repository:tag # Run image from a registry docker services:
docker swarm init # first time you deploy an app or after you shutdown the swarm
docker stack ls # List stacks or apps
docker stack deploy -c <composefile> <appname> # Run the specified Compose file
docker service ls # List running services associated with an app
docker service ps <service> # List tasks associated with an app
docker inspect <task or container> # Inspect task or container
docker container ls -q # List container IDs
docker stack rm <appname> # Tear down an application
docker swarm leave --force # Take down a single node swarm from the manager docker swarm:
docker pull docker.io/vickeywu/docker_test:test
or docker run -p 8080:8080 vickeywu/docker_test:test
curl localhost:8080
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install kernel-devel kernel-headers dkms
yum -y groupinstall "Development Tools"
yum -y update
wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
rpm --import oracle_vbox.asc
wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo
yum -y install VirtualBox-5.1
systemctl start vboxdrv.service
usermod -a -G vboxusers root

references:

install:http://www.linuxidc.com/Linux/2014-12/110034.htm

container:https://docs.docker.com/get-started/

swarm:http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-virtualbox-4-3-on-centos-7-rhel-7.html

docker guide的更多相关文章

  1. web学习测试环境

    ref:https://www.owasp.org/index.php/OWASP_Vulnerable_Web_Applications_Directory_Project/Pages/Offlin ...

  2. 从头开始搭建分布式日志平台的docker环境

    上篇(spring mvc+ELK从头开始搭建日志平台)分享了从头开始搭建基于spring mvc+redis+logback+logstash+elasticsearch+kibana的分布式日志平 ...

  3. The Docker学习记录[Doing]

    微服务 & Docker 译文:使用Java构建微服务 原文:Building Microservices With Java [编者的话]本文翻译自Dzone Guide to the Ja ...

  4. (转)A Survival Guide to a PhD

    Andrej Karpathy blog About Hacker's guide to Neural Networks A Survival Guide to a PhD Sep 7, 2016 T ...

  5. Docker Network containers

    Network containers Estimated reading time: 5 minutes If you are working your way through the user gu ...

  6. Docker distrubution in django

    https://www.syncano.io/blog/configuring-running-django-celery-docker-containers-pt-1/ Update: Fig ha ...

  7. Docker入门教程(七)Docker API

    Docker入门教程(七)Docker API [编者的话]DockerOne组织翻译了Flux7的Docker入门教程,本文是系列入门教程的第七篇,重点介绍了Docker Registry API和 ...

  8. Install Docker on Mac OS X(转)

    Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your c ...

  9. docker offical docs:Working with Containers

    enough ---------------------------------------------------------------------------------- Working wi ...

随机推荐

  1. E20170505-ms

    respectively adv. 分别,各自,顺序 为,依次为 encryption n.加密 corresponding adj. 符合的,相应的,相关的 correspond v. 通信,符合, ...

  2. HDU5589:Tree(莫队+01字典树)

    传送门 题意 略 分析 f[u]表示u到根的边的异或 树上两点之间的异或值为f[u]^f[v], 然后将查询用莫队算法分块,每个点插入到字典树中,利用字典树维护两点异或值大于等于M复杂度O(N^(3/ ...

  3. bzoj 3998: [TJOI2015]弦论【SA+二分||SAM】

    SA的话t==0直接预处理出每个后缀的不同串贡献二分即可,然后t==1就按字典序枚举后缀,然后跳右端点计算和当前后缀的前缀相同的子串个数,直到第k个 不过bzoj上会T #include<ios ...

  4. P4171 [JSOI2010]满汉全席(2-SAT)

    传送门 2-SAT裸题 把每一道菜拆成两个点分别表示用汉式或满式 连边可以参考板子->这里 然后最尴尬的是我没发现$n<=100$然后化成整数的时候只考虑了$s[1]$结果炸掉了2333 ...

  5. poj1850 Code【组合数学】By cellur925

    题意: * 按照字典序的顺序从小写字母 a 开始按顺序给出序列 (序列中都为升序字符串)* a - 1* b - 2* ...* z - 26* ab - 27* ...* az - 51* bc - ...

  6. (四)SpringBoot如何定义消息转换器

    一:添加fastjson依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastj ...

  7. spring3升级到spring4

    升级又失败了,dao层太多要改了,记录一下修改的内容,也是没白费我一下午时间 1. org.springframework.orm.hibernate3.annotation.AnnotationSe ...

  8. CSS3向上移动的效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. Codeforces Round #319 (Div. 2)

    水 A - Multiplication Table 不要想复杂,第一题就是纯暴力 代码: #include <cstdio> #include <algorithm> #in ...

  10. port 22: Connection refused

    issue: os>ssh 196.168.27.90ssh: connect to host 196.168.27.90 port 22: Connection refused solutio ...