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 ~]#