Import and Run Docker image

After installing docker on host run in command line search docker image:

Need be on-line and create account on https://hub.docker.com/
docker search httpd
[root@localhost etc]# docker search httpd
NAME                                    DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
httpd                                   The Apache HTTP Server Project                  2882                [OK]
centos/httpd-24-centos7                 Platform for running Apache httpd 2.4 or bui…   30
centos/httpd                                                                            28                                      [OK]
salim1983hoop/httpd24                   Dockerfile running apache config                2                                       [OK]
lead4good/httpd-fpm                     httpd server which connects via fcgi proxy h…   1                                       [OK]
clearlinux/httpd                        httpd HyperText Transfer Protocol (HTTP) ser…   1
jonathanheilmann/httpd-alpine-rewrite   httpd:alpine with enabled mod_rewrite           1                                       [OK]
solsson/httpd-openidc                   mod_auth_openidc on official httpd image, ve…   1                                       [OK]
dariko/httpd-rproxy-ldap                Apache httpd reverse proxy with LDAP authent…   1                                       [OK]
appertly/httpd                          Customized Apache HTTPD that uses a PHP-FPM …   0                                       [OK]
dockerpinata/httpd                                                                      0
interlutions/httpd                      httpd docker image with debian-based config …   0                                       [OK]
itsziget/httpd24                        Extended HTTPD Docker image based on the off…   0                                       [OK]
manasip/httpd                                                                           0
izdock/httpd                            Production ready Apache HTTPD Web Server + m…   0
trollin/httpd                                                                           0
amd64/httpd                             The Apache HTTP Server Project                  0
e2eteam/httpd                                                                           0
manageiq/httpd_configmap_generator      Httpd Configmap Generator                       0                                       [OK]
publici/httpd                           httpd:latest                                    0                                       [OK]
hypoport/httpd-cgi                      httpd-cgi                                       0                                       [OK]
manageiq/httpd                          Container with httpd, built on CentOS for Ma…   0                                       [OK]
buzzardev/httpd                         Based on the official httpd image               0                                       [OK]
alvistack/httpd                         Docker Image Packaging for Apache               0                                       [OK]

Then you can install docker image from github:

docker run httpd
[root@localhost ~]# docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
httpd               latest              c5a012f9cf45        6 days ago          165MB

Then you can run image and “image” became docker container:

docker run -d httpd

or

docker run -d c5a012f9cf45

Check is it docker container running :

docker ps -a
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE                    COMMAND              CREATED             STATUS              PORTS               NAMES
5154f5756a7a        httpd                    "httpd-foreground"   43 seconds ago      Up 42 seconds       80/tcp              ecstatic_kare