You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »


목차

Search httpd in Docker Hub

Httpd Container 실행

  • docker run -dit --name my-apache-app -p 80:80 -v "/app/apache":/usr/local/apache2/htdocs/ httpd:2.4
[root@lab-centos-on-docker-vm ~]# docker run -dit --name my-apache-app -p 80:80 -v "/app/apache":/usr/local/apache2/htdocs/ httpd:2.4
Unable to find image 'httpd:2.4' locally
2.4: Pulling from library/httpd
000eee12ec04: Pull complete
32b8712d1f38: Pull complete
f1ca037d6393: Pull complete
c4bd3401259f: Pull complete
51c60bde4d46: Pull complete
Digest: sha256:ac6594daaa934c4c6ba66c562e96f2fb12f871415a9b7117724c52687080d35d
Status: Downloaded newer image for httpd:2.4
bb64f606f5afd44e6abf0f7b5327a786d222636a2dbde73068e21183a4d961fa
[root@lab-centos-on-docker-vm ~]#
  • docker ps
[root@lab-centos-on-docker-vm ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                  NAMES
bb64f606f5af        httpd:2.4           "httpd-foreground"   11 seconds ago      Up 9 seconds        0.0.0.0:80->80/tcp   my-apache-app
[root@lab-centos-on-docker-vm ~]#

Index.html 웹페이지 확인


[root@lab-centos-on-docker-vm ~]# cat /app/apache/index.html
hello

  • No labels