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 ...
随机推荐
- In-App Purchase Programming Guide----(七) ----Restoring Purchased Products
Restoring Purchased Products Users restore transactions to maintain access to content they’ve alread ...
- File System Programming --- (一)
About Files and Directories The file system is an important part of any operating system. After all, ...
- linux以行为单位进行读写操作
1 gets/fgets函数 char* fgets(char *restrict buf,int n,FILE *restrict fp) 参数1:存放读入串的缓冲区 参数2:表示读入的字符个数,最 ...
- 关于数据库优化2——关于表的连接顺序,和where子句的前后顺序,是否会影响到sql的执行效率问题
有好多时候,我们常听别人说大表在前,小表在后,包括现在好多百度出来的靠前的答案都有说数据库是从右到左加载的,所以from语句最后关联的那张表会先被处理.如果三表交叉,就选择交叉表来作为基础表.等等一些 ...
- Gradle系列之三 Gradle概述以及生命周期
1 Gradle是一种编程框架 gradle主要由以下三部分组成 1 groovy核心语法 2 build script block 3 gradle api 注:本章所有的代码都在 https:// ...
- E20170507-ts
prompt n. 提示; 提示符 object n. 物体; 目标; 宾语; asterisk * n. 星号,星状物; Ampersand & Slash n. 斜线; ...
- 洛谷 - P1434 - 滑雪 - 有向图最长链
https://www.luogu.org/problemnew/show/P1434 有向图的最长链怎么求?有环肯定不行,这里保证无环.(否则应该使用toposort先求出所有不带环的位置) 设dp ...
- python __builtins__ reversed类 (58)
58.'reversed', 返回一个反转的迭代器. class reversed(object) | reversed(sequence) -> reverse iterator over ...
- iOS RSA (Objc)
/* RSA.h @author: ideawu @link: https://github.com/ideawu/Objective-C-RSA */ #import <Foundation/ ...
- UltraEdit配置C++开发环境
1.下载UltraEdit软件安装 2.下载MinGW库安装 3.在系统设置环境变量,在path里加上你的MinGW\bin目录即可. 4.进入UltraEdit软件进行如下配置: 菜单栏---高级- ...