Apache image managed with circus. Config parameters with envtpl. apache, proftpd and sshd managed by circus.
Apache generic image with these features:
Work in progress. This image is intended to be used as base Dockerfile for projects where you should need sftp and ssh access. But probably, if you need ssh access, you are doing it wrong ;) http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/
- envtpl to configure apache mpm prefork parameters. Also can be used for inherited Dockerfiles.
- circus to control processes. http://circus.readthedocs.org/
- sshd
- proftpd for sftp
- single cron for apache logrotation
See base image apsl/circusbase for more info:
https://registry.hub.docker.com/u/apsl/circusbase/ https://github.com/APSL/docker-circusbase
Below you have a list of configurable env vars with default values shown.
Apache mpm prefork settings (see conf/mpm_prefork.conf.tpl)::
-e WORKERS_MIN=5 # sets StartServers and MinSpareServers
-e WORKERS_SPARE=10 # sets MaxSpareServers
-e WORKERS_MAX=100 # sets Maxclients and ServerLimit
Default virtualhost::
-e DOMAIN=hostname # defaults to container hostname. see conf/default-vhost.tpl
Apache basic auth::
-e BASIC_AUTH=myuser:mypasswd # disabled by default
-e BASIC_AUTH_NAME="Restricted" # AuthName, authorizacion realm for HTTP authentication
If configured, it will add http basic auth for all hosts
SFTP/SSH user::
-e FTP_USER=myuser:mypasswd # disabled by default
SSH public key::
-e SSH_KEY="ssh-dss AAAA...." # disabled by default
- 80: apache
- 22: sshd if enabled
- 2221: proftpd if enabled
For an example using as a base image, see apsl/wordpress:
https://registry.hub.docker.com/u/apsl/wordpress/dockerfile/
-
clone::
git clone https://github.com/APSL/docker-lamp.git
-
build::
cd docker-lamp docker build -t lamp .
-
run::
docker run -v /var/www:/app/www -p 80:80 lamp
OR use docker registry hub:
-
pull: docker pull apsl/lamp
-
run: docker run -p 80:80 apsl/lamp