Docker第一天

rootalocalhost~#docker--version
Docker version 18.03.1-ce, build 9ee9f40
[root@localhost ~]# docker version 
Client:
Version: 18.03.1-ce 
API version: 1.37 
Go version: go1.9.5 
Git commit: 9ee9f40 
Built: Thu Apr 26 07:20:16 2018 
0S/Arch: linux/amd64 
Experimental: false 
Orchestrator:swarm

Server: 
 Engine:
  Version:     18.03.1-ce 
  API version: 1.37(minimum version 1.12) 
  Go version:  go1.9.5 
  Git commit:  9ee9f40 
  Built:       Thu Apr 26 07:23:58 2018 
  0S/Arch:     linux/amd64 
  Experimental:false
root@localhost ~]# docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
   (amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
   to your terminal.

To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/

For more examples and ideas,visit:
https://docs.docker.com/get-started/ 

root@localhost ~]# docker run -it ubuntu bash
o0t@cf59523c3659:/# 

2.

[root@localhost ~]# docker pull nginx 
Using default tag: latest
^[[A^[[Blatest: Pulling from library/nginx 
lefc276f4ff9: Pull complete 
baf2da91597d: Pull complete
05396a986fd3: Pull complete
6a17c8e7063d: Pull complete
27e0d286aeab: Pull complete
b1349eea8fc5: Pull complete
Digest:sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79
Status: Downloaded newer image for nginx:latest 
rootalocalhost ~1#

[rootalocathost~]#docker pull alpine atest: latest
latest:Pulling from library/alpine
213ec9aee27d: Pull complete
Digest:sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad 
Status: Downloaded newer image for alpinelatest
root@localhost ~]# 

rootalocalhost~1# docker pull alpine:latest 
latest: Pulling from library/alpine
213ec9aee27d:Pullcomplete
Digest:sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad 
Status: Downloaded newer image for alpine:latest
[rootalocalhost ~]# docker tag httpd:latest test/httpd:v1 
Error response from daemon: No such image:httpd:latest
[rootalocalhost ~1# docker pull httpd 
Using default tag: latest
latest: Pulling from library/httpd 
lefc276f4ff9:Already exists 
aed046121ed8: Pull complete
4340e7be3d7f: Pull complete
80e368ef21fc: Pull complete
80cb79a80bbe: Pull complete
Digest:sha256:343452ec820a5d59eb3ab9aaa6201d193f91c3354f8c4f29705796d9353d4cc6 
Status: Downloaded newer image for http:latest
[rootalocalhost ~]# docker tag httpd:latest test/httpd:v1 
[rootalocalhost ~]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值