Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Nächste Überarbeitung | Vorherige Überarbeitung | ||
admin_grundlagen:apache_httpd_mit_docker [2024/02/24 07:44] ingo_wichmann angelegt |
admin_grundlagen:apache_httpd_mit_docker [2024/03/01 08:57] (aktuell) ingo_wichmann |
||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
siehe https://hub.docker.com/_/httpd | siehe https://hub.docker.com/_/httpd | ||
- | ===== erster Start ===== | + | ===== persistente Daten für den Container anlegen ===== |
mkdir -p /srv/docker/httpd/htdocs | mkdir -p /srv/docker/httpd/htdocs | ||
cd /srv/docker/httpd | cd /srv/docker/httpd | ||
Zeile 15: | Zeile 15: | ||
</html> | </html> | ||
</code> | </code> | ||
+ | ===== erster Start ===== | ||
docker run -d --name hello-httpd -p 8888:80 -v '/srv/docker/httpd/htdocs:/usr/local/apache2/htdocs/' httpd:2.4 | docker run -d --name hello-httpd -p 8888:80 -v '/srv/docker/httpd/htdocs:/usr/local/apache2/htdocs/' httpd:2.4 | ||
-> http://localhost:8888 | -> http://localhost:8888 | ||
curl http://localhost:8888 | curl http://localhost:8888 | ||
+ | Betreten der Instanz: | ||
+ | docker exec -it hello-httpd /bin/bash | ||
+ | ls conf/httpd.conf | ||
+ | exit | ||
Instanz löschen: | Instanz löschen: | ||
docker stop hello-httpd | docker stop hello-httpd |