[root@dyw219 newimg]# docker images centos/httpd REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos/httpd index eec966fc2c86 19 seconds ago 258 MB centos/httpd latest b4650389df73 7 months ago 258 MB
[root@dyw219 newimg]# docker run -dit --name myweb -p 8080:80 centos/httpd:index 6f9d0405f15bb13e7723b637e90eb18a7a7306289ce659ec8f88f7fcd6cd5b78
[root@dyw219 newimg]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6f9d0405f15b centos/httpd:index "/run-httpd.sh" 4 seconds ago Up 4 seconds 0.0.0.0:8080->80/tcp myweb
[root@dyw219 newimg]# curl http://127.0.0.1:8080 myweb test