Skip to content

pozgo/docker-httpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache in a Docker with Supervisor (CentOS 7 & Alpine)

Build Status
GitHub Open Issues
Stars Fork
Docker Start Docker Pulls Docker Auto

Felling like supporting me in my projects use donate button. Thank You!

Docker Image with Apache server using polinux/supervisor docker image as base.

Environmental Variable

Variable DefaultSettings Info
LOG_LEVEL info Specify log level Apache should when started. Apache Log Levels
DEFAULT_CONFIG true Use default config provided by Apache package - Change to false when using custom config

Usage

Basic

docker run \
  -d \
  --name httpd \
  -p 80:80 \
  polinux/httpd

Set log level to debug

docker run \
  -d \
  --name httpd \
  -p 80:80 \
  -e LOG_LEVEL="debug" \
  polinux/httpd

Build

docker build -t polinux/httpd .

Docker troubleshooting

Use docker command to see if all required containers are up and running:

$ docker ps

Check logs of httpd server container:

$ docker logs httpd

Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:

docker exec -ti httpd /bin/bash

History of an image and size of layers:

docker history --no-trunc=true polinux/httpd | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'

Author

Przemyslaw Ozgo (linux@ozgo.info)