[root@dyw219 ~]# docker run -dit --name web -p 8080:80 centos/httpd ed1f252bbd4e6b7c8053162cbcfbcf2d50ce4dfffd02e4a2b0d900ae89a9a401
[root@dyw219 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ed1f252bbd4e centos/httpd "/run-httpd.sh" 7 seconds Up 6 seconds 0.0.0.0:8080->80/tcp web
[root@dyw219 ~]# curl -sN http://0.0.0.0:8080/ | grep 'CentOS Project'
<p class="lead">The CentOS Project has nothing to do with
this website or its content,
Unless you intended to visit CentOS.org, the CentOS Project
does not have anything to do with this website,
<h2>The CentOS Project</h2>
[root@dyw219 ~]# docker stop ed1f252bbd4e
[root@dyw219 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [root@dyw219 ~]#
[root@dyw219 ~]# docker ps -a | grep 'centos/httpd' ed1f252bbd4e centos/httpd "/run-httpd.sh" 9 minutes ago Exited (137) ... web