docker guide
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的更多相关文章
- web学习测试环境
		
ref:https://www.owasp.org/index.php/OWASP_Vulnerable_Web_Applications_Directory_Project/Pages/Offlin ...
 - 从头开始搭建分布式日志平台的docker环境
		
上篇(spring mvc+ELK从头开始搭建日志平台)分享了从头开始搭建基于spring mvc+redis+logback+logstash+elasticsearch+kibana的分布式日志平 ...
 - The Docker学习记录[Doing]
		
微服务 & Docker 译文:使用Java构建微服务 原文:Building Microservices With Java [编者的话]本文翻译自Dzone Guide to the Ja ...
 - (转)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 ...
 - Docker Network containers
		
Network containers Estimated reading time: 5 minutes If you are working your way through the user gu ...
 - Docker distrubution in django
		
https://www.syncano.io/blog/configuring-running-django-celery-docker-containers-pt-1/ Update: Fig ha ...
 - Docker入门教程(七)Docker API
		
Docker入门教程(七)Docker API [编者的话]DockerOne组织翻译了Flux7的Docker入门教程,本文是系列入门教程的第七篇,重点介绍了Docker Registry API和 ...
 - 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 ...
 - docker offical docs:Working with Containers
		
enough ---------------------------------------------------------------------------------- Working wi ...
 
随机推荐
- 查看mysql状态
			
命令:mysqladmin -uroot -p -h172.16.0.20 status Uptime: 14317755 Threads: 61 Questions: 187732924 Sl ...
 - JAVA基础-面向对象07
			
一.代码块 1. 含义: 就是使用大括号括起来的一段代码 格式 { 代码: } 2.静态代码块 格式 static{ 代码: } 书写位置: 直接书写在类中成员位置: 怎么执行呢? 在类加载的最后一步 ...
 - rn滑动返回页面监听
			
开发rn的同学都已经知道这个问题很坑了,真的很难弄,网上的方法尝试过很多,返回的的时候回调,是用的最多的,最开始我也是用的这种方式,但是滑动返回的时候监听不到.并且用起来也比较麻烦,不但需要在当前页面 ...
 - 洛谷 - P1219 - 八皇后 - dfs
			
https://www.luogu.org/problemnew/show/P1219 一开始朴素检查对角线就TLE了,给对角线编码之后压缩了13倍时间? 找了很久的bug居然是&&写 ...
 - unity ShaderLab 编辑器——sublime text 2
			
sublime text 2,支持unity shader关键字高亮显示,智能提示功能.这个脚本编辑器的售价是70美元,不过作者很厚道地给了我们永久的免费试用期. 1)下载sublime text 2 ...
 - jQuery 第九章 工具方法
			
$.type() $.isArray() $.isFunction() $.isWindow()... $.trim() $.proxy() $.noConflict() $.each() $.map ...
 - Nginx系列篇四:Nginx+keepalived搭建一个高可用的双机双主热备
			
建议:先阅读Nginx+keepalived主从配置,因为此篇是接着上篇开始的 上一篇我们简单的介绍了主从配置及其缺点,我们看一下双主热备配置: 2台Nginx+keepalived互为主备,各自绑定 ...
 - jqgrid 分级标题
			
参考地址:http://www.trirand.com/jqgridwiki/doku.php?id=wiki:groupingheadar Grouping of the header should ...
 - 【数据结构(C语言版)系列三】 队列
			
队列的定义 队列是一种先进先出的线性表,它只允许在表的一端进行插入,而在另一端删除元素.这和我们日常生活中的排队是一致的,最早进入队列的元素最早离开.在队列中,允许插入的一端叫做队尾(rear),允许 ...
 - BZOJ1833(数位dp)
			
这个数位dp倒是没什么限制条件,只是需要在过程中把每个数字出现次数记录一下即可.记忆化返回时数学算出.框架还是套板子. #include <cstdio> #include <cma ...