Sign inSign up

nimmis/alpine-apache

By nimmis

•Updated almost 5 years ago

This is a micro docker container based on Alpine OS and Apache version 2

Image
13

100K+

nimmis/alpine-apache repository overview

⁠Alpine microcontainer with Apache2

This is a micro docker container based on Alpine OS and Apache version 2.

There images are build on nimmis/alpine-micro⁠ which are a modified version of Alpine OS with a working init process, cron, logrotate and syslog. All services are started by runit daemon, for more information about how it works and setup of new services please visit https://hub.docker.com/r/nimmis/alpine-micro/⁠ for more information.

The container also have a backup system with cron schedule, number of copies to save etc, for information about the backup system please visit the README.md for the backupsystem⁠

⁠starting the container as a daemon
docker run -d --name apache nimmis/alpine-apache

This will start the container with apache process running, to access the container use

docker exec -ti apache /bin/sh
⁠Static web folder

The images exposes a volume at /web. The structure is

DirectoryFunction
/web/htmlweb root
/web/cgi-bincgi bin folder
/web/configapache config directory
/web/logsapache log directory
/web/internalinternal pages, error pages etc

To use this start the container with

docker run -d --name apache -v /path/to/web:/web nimmis/alpine-apache

if the folders are missing they will be created each time the container is started.

⁠Accessing apache from outside the container

To access the webserver from external you can the -P/-p paramter, with -P the ports 80 and 443 is automaticly exposed and assign a random port.

or use the -p command to assign other ports, the syntax is

-p <external port on host>:<local port in container>

so to access the apache server port 80 on port 8080 you should use the command

docker run -d --name apache -p 8080:80 nimmis/alpine-apache

or assigning 80->80 and 443->443 use

docker run -d --name apache -p 80:80 -p 443:443 nimmis/alpine-apache
⁠Successsful setup

If everything worked and you were able to expose the correct port and type the correct adress in a webbrowser the following page should appear.

screenshot

Tag summary

Content type

Image

Digest

Size

8.4 MB

Last updated

almost 5 years ago

docker pull nimmis/alpine-apache