Image runner-Apache
Startx apache is a base container used for web services and applications published in Dockerhub registry. This container contain :
- fedora system envelope
- core OS rpm (kernel, libs) updated every week
- fundamentals tools (ex: pwgen, tar, zip) updated every week
- Apache webserver and fundamentals modules (apache release depend on the flavour you use, read down for more information)
- usefull tools (psmisc, procps, coreutils, findutils, wget, curl, vi, bash-completion) only for the
:latest
and:devel
flavour.
You can use Startx Apache image in many ways :
- Build personalized base image with docker tools
- Run as simple and lightweiht webserver with docker daemon
- Run a minimal container app with docker-compose
See more applications builders and sample on startx docker images repository
Container flavours
Docker Hub repository | Content | Apache | Make |
---|---|---|---|
startx/runner-apache:latest |
Fedora core rawhide | 2.4.46 | 4.3 |
startx/runner-apache:35 |
Fedora core 35 | 2.4.46 | 4.3 |
startx/runner-apache:34 |
Fedora core 34 | 2.4.46 | 4.3 |
startx/runner-apache:33 |
Fedora core 33 | 2.4.46 | 4.3 |
startx/runner-apache:32 |
Fedora core 32 | 2.4.39 | |
startx/runner-apache:31 |
Fedora core 31 | 2.4.46 | 4.2.1 |
startx/runner-apache:30 |
Fedora core 30 | 2.4.39 | |
startx/runner-apache:29 |
Fedora core 29 | 2.4.39 | |
startx/runner-apache:28 |
Fedora core 28 | 2.4.17 | |
startx/runner-apache:27 |
Fedora core 27 | 2.4.17 | |
startx/runner-apache:26 |
Fedora core 26 | 2.4.17 | |
startx/runner-apache:alma8 |
Alma 8 | 2.4.37 | 4.2.1 |
startx/runner-apache:rocky8 |
Rocky 8 | 2.4.37 | 4.2.1 |
startx/runner-apache:centos9 |
Centos 9 | 2.4.37 | 4.2.1 |
startx/runner-apache:centos8 |
Centos 8 | 2.4.37 | 4.2.1 |
startx/runner-apache:centos7 |
Centos 7 | 2.4.6 | 3.82 |
startx/runner-apache:ubi8 |
RedHat UBI 8 | 2.4.37 | 4.2.1 |
startx/runner-apache:alpine3 |
Alpine 3.12 | 2.4.46 | 4.3 |
Running this image
If you want to be guided on setting-up and installing various containers engines (docker, podman, s2i, dockerEE, kubernetes, openshift) you can read ours containers engines guidelines.
Running using docker
docker run -it -p 9201:8080 --name="example-apache" startx/runner-apache
- Connect to your local application
firefox http://localhost:9201
Running using docker-compose
- Create a
docker-compose.yml
file with the following content
apache:
image: startx/runner-apache:latest
container_name: "example-apache"
ports:
- "9201:8080"
- Execute the following command
docker-compose up -d
docker-compose logs
- Connect to your local application
firefox http://localhost:9201
Using this image as base container
You can use this Dockerfile template to start a new personalized container based on this container. Create a file named Dockerfile
in your project directory and copy this content inside. See docker guide for instructions on how to use this file.
FROM quay.io/startx/runner-apache:latest
#... your container specifications
Environment variable
This container is based on startx apache container who came with some additional environment variable
Variable | Type | Default | Description |
---|---|---|---|
base image environement | see environment list | ||
SX_VERSION | string |
latest |
container version |
SX_TYPE | string |
service |
Container family (os, service, application). could be enhanced |
SX_SERVICE | string |
apache |
Define the type of service or application provided |
SX_ID | auto |
startx/runner-apache |
Container ID coresponding to the image repository |
SX_NAME | auto |
yes |
Container name |
SX_SUMMARY | auto |
yes |
Container purpose description |
SX_VERBOSE | bool |
no |
Display information about the execution |
SX_DEBUG | bool |
no |
Display debug informations during execution |
APP_PATH | string |
/app |
Path to the application |
APP_PORT | string |
8080 |
Port to the application |
LOG_PATH | string |
/var/log/httpd |
Destination path to the log produced by the webserver |
SX_S2IDIR | string |
/tmp |
Destination path to the application pushed via s2i process |
Exposed port
Port | Description |
---|---|
8080 | network port used to communicate with apache service using http |
Exposed volumes
Container directory | Description |
---|---|
/var/log/httpd | log directory used to record container and nodejs logs |
/app | Main application components (already defined, use volume to overwrite html content) |
Testing the service
access to the running nodejs service with http client curl -k -I http://localhost:9201
. Change port and hostname according to your current configuration
For advanced users
You can contribute or start this container initiative locally. Follow theses instructions to setup a working environment.
This section will help you if you want to :
- Get latest version of this container Service source code
- Enhance and share your container improvement by adding instruction in Dockefile
Build & run a container using docker
- Jump into the container directory with
cd GitlabRunner/apache
- Build the container using
docker build -t startx-apache .
- Run this container
- Interactively with
docker run -it startx-apache
. If you add a second parameter (like/bin/bash
) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex:/bin/bash
,/bin/ps -a
,/bin/df -h
,…) - As a daemon with
docker run -d -p 9201:8080 startx-apache
Build & run a container using docker-compose
- Jump into the container directory with
cd GitlabRunner/apache
- Run this container
- Interactively with
docker-compose up
Startup logs appears and escaping this command stop the container - As a daemon with
docker-compose up -d
. Container startup logs can be read usingdocker-compose logs