mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-06-30 01:27:02 +00:00
5c2d1b2fa9
For some Host OS configuration with redirect_dir on, extra data are saved on the upper layer when the same file exists on different layers. To minimize docker image size, remove the overlapped files before copy, when cgit, httpd, mariadb, memcached, nginx and postgres. Signed-off-by: Liu, Jianjun <jianjun.liu@intel.com>
httpd
This provides a Clear Linux* httpd instance.
Build
docker build -t clearlinux/httpd .
Or just pull it from Dockerhub
docker pull clearlinux/httpd
start a redis instance
docker run --name some-httpd -dit -p 8080:80 clearlinux/httpd
connecting
curl http://localhost:8080/ # locally
curl http://${server-ip}:8080/ # remotely
benchmark test using apache ab
Please refer to the page for details.
ab -n 25000 -c 50 -k http://${server-ip}:8080/
use customized configuration file
The default conf file on clear Linux* is put on /usr/share/defaults/httpd/httpd.conf. The /etc/httpd/conf.d/httpd.conf could be used to override the defaul one. The default DocumentRoot is on /var/www/html/. Above could be modified dynamically by "docker run -v " option, for example,
docker run --name some-httpd -dit -p 8080:80 \
-v /etc/httpd/conf.d:/etc/httpd/conf.d \
-v $PWD/html:/var/www/html \
clearlinux/httpd
Extra Build ARGs
swupd_argsSpecifies SWUPD flags
Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg