1. docker - httpd

 

 


Setup Contrainer

 

podman pull httpd:2.4

Prepare Config File

podman run -dit --name DummyApache httpd

mkdir -p data/httpd

podman cp DummyApache:/usr/local/apache2/htdocs data/httpd

podman cp DummyApache:/usr/local/apache2/conf data/httpd

podman stop DummyApache

podman rm DummyApache

Config it

sed -i -e 's/^\(LoadModule .*mod_autoindex.so\)/#\1/' conf/httpd.conf

Start it

docker run -dit --name MyApache  \
 -v /data/httpd/htdocs:/usr/local/apache2/htdocs/ \
 -v /data/httpd/conf:/usr/local/apache2/conf/ \
 httpd

Get Container IP

podman inspect --format '{{ .NetworkSettings.IPAddress }}' MyApache

Test

# On host

curl 172.17.0.2

Contrainer Folder

/usr/local/apache2
bin
build
cgi-bin
conf
error
htdocs
icons
include
logs
modules