博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Docker常用命令(非swarm模式)
阅读量:4180 次
发布时间:2019-05-26

本文共 522 字,大约阅读时间需要 1 分钟。

Docker 1.12 非swarm模式的常用命令:

1.查看信息

docker version

docker --version
docker info
docker images
docker images -q#只给出images id

2.基于一个镜像启动一个容器

docker run -d --name myweb -p 8080:8080 one_images

docker stop myweb

docker start myweb
docker rm myweb #删除容器

3.查看容器进程

docker ps -a

docker ps -aq #只有containers id

4.Docker Hub中在线获取一个镜像,指定名称和版本

docker pull ubuntu:14.04

    删除本地镜像

docker rmi ubuntu:14.04 #删除镜像文件

5.Docker Hub中在线获取并启动一个容器

docker run hello-world

6.为已有的镜像创建tag并发布
docker tag repository_of_an_image new_tag

docker push new_tag

转载地址:http://xxlai.baihongyu.com/

你可能感兴趣的文章
C++字符串函数
查看>>
mknod详解
查看>>
linux中的run-level何解?
查看>>
Linux内核编译详解(转自linuxSir)
查看>>
实模式,保护模式与V86模式
查看>>
628. Maximum Product of Three Numbers(排序)
查看>>
Linux内核-------同步机制(一)
查看>>
485. Max Consecutive Ones(数组)
查看>>
287. Find the Duplicate Number(数组)
查看>>
Linux内核-------同步机制(二)
查看>>
面试题31-------连续子数组的最大和(数组)
查看>>
epoll 实现Chat
查看>>
21. Merge Two Sorted Lists(链表)
查看>>
2. Add Two Numbers(链表)
查看>>
637. Average of Levels in Binary Tree(Tree)
查看>>
226. Invert Binary Tree(Tree)
查看>>
328. Odd Even Linked List(链表)
查看>>
617. Merge Two Binary Trees(Tree)
查看>>
700. Search in a Binary Search Tree(Tree)
查看>>
515. Find Largest Value in Each Tree Row(Tree)
查看>>