Common-used commands in Docker
1. Start running a image in background mode
docker run -it -d <image>:<tag>
e.g. docker run -it -d ubuntu:16.04
2. Start running a image and bind a volume
docker run -it -d <image>:<tag> -v <host_path>:<container_path>
e.g. docker run -it -v /tmp/docker_shared:/home/Downloads -d ubuntu:16.04
3. Commit an image based on specific container
docker commit -m "<comment>" -a "<author>" <container_id> <repo_name>:<tag>
e.g. docker commit -m "Added HBase Standalone database" -a "Xianyi Ye" e6f05969d5db yexianyi/hbase-standalone:v1
4. Log into docker hub
docker login --username=<username> --password=<password>
e.g. docker login --username=tester --password=tester
5. Push your own image to docker hub
docker push <image>:<tag>
e.g. docker push yexianyi/hbase-standalone:v1
6. Remove stopped container
docker rm <container_id>
e.g. docker rm 3e0d79e2e5ea
7. Remove image
docker rmi <image_id>
e.g. docker rmi 3e0d79e2e5ea
8. Check CPU&Mem occupation
docker stats
9. Remove all containers
docker rm `docker ps -a -q`
Common-used commands in Docker的更多相关文章
- Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7
https://access.redhat.com/articles/1189123 Common administrative commands in Red Hat Enterprise Linu ...
- useful commands for docker beginner
You may want to add my wechat public account or add my technical blog's RSS feed This list is meant ...
- The common Linux Commands
Linux的命令总结 1. man:在线请求系统帮助 例:man mkdir NAME:这个命令的完整全名 mk(make directories) SYNOPSIS:这个命令的基本语法 mkdir ...
- Common Linux Commands 日常工作常用Linux命令
How to know CPU info cat /proc/cpuinfo arch How to know memory info: cat /proc/meminfo ...
- [Bash] Create Aliases in .bash_profile for Common Bash Commands
.bash_profile is a file that bash invokes (or more technically sources) before the start of a new ba ...
- Introducing Makisu: Uber’s Fast, Reliable Docker Image Builder for Apache Mesos and Kubernetes
转自:https://eng.uber.com/makisu/?amp To ensure the stable, scalable growth of our diverse tech stack, ...
- Docker GitHub 网站中 Readme.md 以技术者的角度翻译
Docker 是一个开源的轻量级容器项目,用于让你的应用在它上面打包.集装和运行.Docker 运行的环境既包含未知硬件也包含未知操作系统.这句话的意思是它可以运行在任何地方,小到你的笔记本大到一个大 ...
- CentOS7系列--5.2CentOS7中配置和管理Docker
CentOS7配置和管理Docker Docker是操作系统级别的虚拟化工具,它能自动化布署在容器中的应用 1. 安装Docker 1.1. 安装Docker相关软件 [root@server1 ~] ...
- 【云计算】docker的小知识,帮你更深入理解容器技术
关于docker的15个小tip 1. 获取最近运行容器的id 这是我们经常会用到的一个操作,按照官方示例,你可以这样做(环境ubuntu): $ ID=$(docker run ubuntu e ...
随机推荐
- Array方面Js底层代码学习记录
一..clear() →Array function clear() { this.length = 0; return this; } 返回清除item的空数组. 例子: var fruits = ...
- 关于oracle11g在window10环境下安装不满足最低要求问题:报错NS-13001
安装oracle11g时遇到INS-13001环境不满足最低要求: oracle在安装前会自动检测电脑配置,主要是内存的满足,但是博主最近在window10上装oracle11g时,发生了不满足最低要 ...
- linux搭建node环境超详细教程
linux 环境搭建详细步骤 1.访问官方网址:https://nodejs.org/en/download/ 2.选择和你服务器版本相关的压缩包,复制下载链接 3.服务器登录ssh,(这里我用的服务 ...
- Xshell5下利用sftp上传下载传输文件
sftp是Secure File Transfer Protocol的缩写,安全文件传送协议.可以为传输文件提供一种安全的加密方法.sftp 与 ftp 有着几乎一样的语法和功能.SFTP 为 SSH ...
- winform中的数据绑定
1. 简单的数据绑定 例1 using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[& ...
- css 相关算法
计算 em 目标像素 除 基准像素 等于 em倍数结果: 14 / 16 = 0.875em 0.875倍也就是 14 像素 计算百分比 目标像素 除 父类总宽度 乘 一百:90 / 200 * 10 ...
- ES6 new syntax of Arrow Function
Arrow Function.md Arrow Functions The basic syntax of an arrow function is as follows var fn = data ...
- [LeetCode] Valid Triangle Number 合法的三角形个数
Given an array consists of non-negative integers, your task is to count the number of triplets chose ...
- [LeetCode] Student Attendance Record I 学生出勤记录之一
You are given a string representing an attendance record for a student. The record only contains the ...
- Docker(六):Docker 三剑客之 Docker Swarm
实践中会发现,生产环境中使用单个 Docker 节点是远远不够的,搭建 Docker 集群势在必行.然而,面对 Kubernetes, Mesos 以及 Swarm 等众多容器集群系统,我们该如何选择 ...