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命令行参数
一,mysql命令行参数 Usage: mysql [OPTIONS] [database] //命令方式 -?, --help //显示帮助信息并退出 -I, --help ...
- Goroutine被动调度之一(18)
本文是<Go语言调度器源代码情景分析>系列的第18篇,也是第四章<Goroutine被动调度>的第1小节. 前一章我们详细分析了调度器的调度策略,即调度器如何选取下一个进入运行 ...
- 注册CSDN账号的尴尬
因为新浪博客这里代码显示不大好用,打算把关于编程和应用开发的东西改到那里去写,可是点击注册.... 竟然要输入手机号,无法跳过.... 要知道,楼主现在可是在国外,压根没有可用于注册的手机号啊.. ...
- bzoj 3576: [Hnoi2014]江南乐【博弈论】
这个东西卡常--预处理的时候要先把i%j,i/j都用变量表示,还要把%2变成&1-- 首先每一堆都是不相关子游戏,所以对于每一堆求sg即可 考虑暴力枚举石子数i,分割块数j,分解成子问题求xo ...
- C#读取大文件
有些时候需要读取文件,小文件的时候效率的影响可以忽略,但是当文件上M,上G的时候,这个时候,效率问题就非常重要了,下面将对一个3G的文件,用C#的方式读取,对比效率的影响. 1. FileStream ...
- bzoj 4821 [Sdoi2017]相关分析
题面 https://www.lydsy.com/JudgeOnline/problem.php?id=4821 题解 做法显然 就是维护一颗线段树 里面装4个东西 区间x的和 区间y的和 区间$x^ ...
- AtCoder Grand Contest 012 A
A - AtCoder Group Contest Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statem ...
- Easy Game LightOJ - 1031
Easy Game LightOJ - 1031 upd:似乎有复杂度更优越的做法,见http://www.cnblogs.com/hehe54321/p/8431020.html 题意:A和B玩一个 ...
- 容器API
- CSS层叠的问题、标准文档流、伪类选择器
一.层叠的问题 CSS有两个性质: 1.继承性 2.层叠性:选择器的一种选择能力,谁的权重大就选谁 层叠性又分为: 1).选不中:走继承性 (font.color.text.) 继承性的权重是0 若 ...