Configurable in-container modcluster.
1.1K
Based on karm's mod_cluster-dockerhub version. I just don't like the long image names. ;)
This is a mod_cluster toy dev image offering Apache HTTP Server and mod_cluster smart load balancer built from sources. The Dockerfile comprises a smoke test that verifies whether the compiled server starts without segfaults.
You can configure the mod_cluster parameters through following environment variables provided to docker run command:
MODCLUSTER_PORT listening port (default: 6666)MODCLUSTER_ADVERTISE On/Off flag for ServerAdvertise (default: On)MODCLUSTER_ADVERTISE_GROUP Advertise address and port (default: 224.0.1.105:23364)MODCLUSTER_NET a Require ip value for the listener (default: 172.)MODCLUSTER_MANAGER_NET a Require ip value for the mod_cluster manager on path /mcm (default: value of MODCLUSTER_NET variable)The defaults could work in your Docker environment.
docker pull kwart/mod_cluster
docker run -d -P -i --name mod_cluster kwart/mod_cluster
docker ps
+++ snip +++
curl 127.0.0.1:49157/mcm
To debug/inspect, one may use:
docker exec -i -t mod_cluster bash
This example show how to run a container with host's network stack, disabled advertisement and moc_cluster-manager available only from localhost.
docker run -it --rm --net host --name mod_cluster \
-e MODCLUSTER_ADVERTISE=Off \
-e MODCLUSTER_NET=192.168. \
-e MODCLUSTER_MANAGER_NET=127.0.0.1 \
kwart/mod_cluster
curl 127.0.0.1:6666/mcm
One may base one's own images on this kwart/mod_cluster as simply as with creating a Dockerfile:
FROM kwart/mod_cluster:latest
MAINTAINER Your identity of choice <[email protected]>
# Your own configuration located in the same directory as your Dockerfile
COPY mod_cluster.conf ${HTTPD_MC_BUILD_DIR}/conf/extra/mod_cluster.conf
# Your own entry point script located in the same directory as your Dockerfile
COPY docker-entrypoint.sh /
Note that HTTPD_MC_BUILD_DIR as well as other ENV constants are propagated to your Dockerfile.
Content type
Image
Digest
sha256:aacd9f8c4…
Size
252 MB
Last updated
almost 11 years ago
docker pull kwart/mod_cluster