Docker hub is repository of images for Community Edition.

1.Checking docker images available in server

[root@debasiseric3 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE


2.Let me try to pull a demo project

[root@debasiseric3 ~]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

3.Let me check what latest images pulled.


[root@debasiseric3 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 4 days ago 1.85kB

4.Now I can pull all packages along with latest

[root@debasiseric3 ~]# docker pull -a hello-world
latest: Pulling from library/hello-world
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
linux: Pulling from library/hello-world
Digest: sha256:c04eb928016c5ba813819c544ed97c24301e8a0a2b5f078a760024a30e861d19
nanoserver-1709: Pulling from library/hello-world
no matching manifest for linux/amd64 in the manifest list entries

5.Let me see all docker images pulled now

[root@debasiseric3 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 4 days ago 1.85kB
hello-world linux e38bc07ac18e 4 days ago 1.85kB


6.Download docker images which is automatically trusted by repository

[root@debasiseric3 ~]# docker pull --disable-content-trust hello-world
Using default tag: latest
latest: Pulling from library/hello-world
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Image is up to date for hello-world:latest

7.Please run the hello-world after instantiating docker.

[root@debasiseric3 ~]# 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/engine/userguide/

8.Now using following command,I can see long image id.

[root@debasiseric3 ~]# docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
hello-world latest sha256:c04eb928016c5ba813819c544ed97c24301e8a0a2b5f078a760024a30e861d19 e38bc07ac18e 4 days ago 1.85kB
hello-world latest sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77 e38bc07ac18e 4 days ago 1.85kB
hello-world linux sha256:c04eb928016c5ba813819c544ed97c24301e8a0a2b5f078a760024a30e861d19 e38bc07ac18e 4 days ago 1.85kB
hello-world linux sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77 e38bc07ac18e 4 days ago 1.85kB

9.Let me pull centos image of version 6 using filter

[root@debasiseric3 ~]# docker pull centos:6
6: Pulling from library/centos
987d765a926d: Pull complete
Digest: sha256:67b491e26d566ee9c55578bfd6115554a6e1b805a49502ead32cb1a324466f2c
Status: Downloaded newer image for centos:6

10.Now checking docker images again.

[root@debasiseric3 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 4 days ago 1.85kB
hello-world linux e38bc07ac18e 4 days ago 1.85kB
centos 6 70b5d81549ec 9 days ago 195MB

11.Displaying full image information

[root@debasiseric3 ~]# docker images --no-trunc
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest sha256:e38bc07ac18ee64e6d59cf2eafcdddf9cec2364dfe129fe0af75f1b0194e0c96 4 days ago 1.85kB
hello-world linux sha256:e38bc07ac18ee64e6d59cf2eafcdddf9cec2364dfe129fe0af75f1b0194e0c96 4 days ago 1.85kB
centos 6 sha256:70b5d81549ec19aa0a10f8660ba5e1ab9966008dbb1b6c5af3d0ecc8cff88eef 9 days ago 195MB

12.Review only the image id

[root@debasiseric3 ~]# docker images -q
e38bc07ac18e
e38bc07ac18e
70b5d81549ec

13.Filter the most rated docker images

[root@debasiseric3 ~]# docker search --filter stars=50 apache
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
tomcat Apache Tomcat is an open source implementati… 1802 [OK]
httpd The Apache HTTP Server Project 1634 [OK]
cassandra Apache Cassandra is an open-source distribut… 755 [OK]
maven Apache Maven is a software project managemen… 580 [OK]
solr Solr is the popular, blazing-fast, open sour… 518 [OK]
zookeeper Apache ZooKeeper is an open-source server wh… 353 [OK]
eboraas/apache-php PHP5 on Apache (with SSL support), built on … 136 [OK]
eboraas/apache Apache (with SSL support), built on Debian 86 [OK]
webdevops/php-apache Apache with PHP-FPM (based on webdevops/php) 61 [OK]
webdevops/php-apache-dev PHP with Apache for Development (eg. with xd… 50 [OK]
tomee Apache TomEE is an all-Apache Java EE certif… 50 [OK]

[root@debasiseric3 ~]# docker search --filter stars=50 --filter is-official=true apache
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
tomcat Apache Tomcat is an open source implementati… 1802 [OK]
httpd The Apache HTTP Server Project 1634 [OK]
cassandra Apache Cassandra is an open-source distribut… 755 [OK]
maven Apache Maven is a software project managemen… 580 [OK]
solr Solr is the popular, blazing-fast, open sour… 518 [OK]
zookeeper Apache ZooKeeper is an open-source server wh… 353 [OK]
tomee Apache TomEE is an all-Apache Java EE certif… 50 [OK]




Leave a Reply

Your email address will not be published. Required fields are marked *