Image APACHE
Startx apache is a base container used for web services and applications published in Dockerhub registry and Quay registry. This container contain :
- fedora / centos /alpine /ubi operating system
- core OS packages (kernel, libs) updated every week
- fundamentals tools (ex: pwgen, tar, zip) updated every week
- usefull tools (psmisc, procps, coreutils, findutils, wget, curl, vi, bash-completion) only for the
:latest
flavour. - Apache webserver and fundamentals modules (apache release depend on the flavour you use, see container flavours for more information)
You can use Startx Apache image in many ways :
- Image APACHE
- Container flavours
- Running this image
- Environment variable
- Container command
- For advanced users
See more applications builders and sample on startx docker images repository
Container flavours
Docker Hub repository | Content | Apache |
---|---|---|
startx/sv-apache:latest |
Fedora core rawhide | 2.4.46 |
startx/sv-apache:35 |
Fedora core 35 | 2.4.46 |
startx/sv-apache:34 |
Fedora core 34 | 2.4.46 |
startx/sv-apache:33 |
Fedora core 33 | 2.4.46 |
startx/sv-apache:32 |
Fedora core 32 | 2.4.43 |
startx/sv-apache:31 |
Fedora core 31 | 2.4.46 |
startx/sv-apache:30 |
Fedora core 30 | 2.4.41 |
startx/sv-apache:29 |
Fedora core 29 | 2.4.41 |
startx/sv-apache:28 |
Fedora core 28 | 2.4.39 |
startx/sv-apache:27 |
Fedora core 27 | 2.4.34 |
startx/sv-apache:26 |
Fedora core 26 | 2.4.33 |
startx/sv-apache:23 |
Fedora core 23 | 2.4.23 |
startx/sv-apache:22 |
Fedora core 22 | 2.4.18 |
startx/sv-apache:21 |
Fedora core 21 | |
startx/sv-apache:20 |
Fedora core 20 | |
startx/sv-apache:alma8 |
Alma 8 | 2.4.37 |
startx/sv-apache:rocky8 |
Rocky 8 | 2.4.37 |
startx/sv-apache:centos9 |
Centos 9 | 2.4.37 |
startx/sv-apache:centos8 |
Centos 8 | 2.4.37 |
startx/sv-apache:centos7 |
Centos 7 | 2.4.6 |
startx/sv-apache:centos6 |
Centos 6 | 2.2.15 |
startx/sv-apache:ubi8 |
RedHat UBI 8 | 2.4.37 |
startx/sv-apache:alpine3 |
Alpine 3.12 | 2.4.46 |
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/sv-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/sv-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
Running using Openshift
Openshift images streams
Openshift cluster administrator can offer this image and all its flavour to all consumers.
You can import our openshift images stream
in your openshift
project.
You must be cluster-admin to add this image to the openshift
project. If not, you can add it to your own
project (skip the oc project openshift
command in the next script)
# swith to the openshift project
oc project openshift
# Add image streams to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/apache/openshift-imageStreams.yml
Openshift builder template
Openshift cluster administrator can add a build and deploy template to their consumers.
As an administrator, you can import our openshift builder template
in your openshift
project.
You must be cluster-admin to add this image to the openshift
project. If not, you can add it to your own
project (skip the oc project openshift
command in the next script)
# swith to the openshift project
oc project openshift
# Add this template to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/apache/openshift-template-build.yml
You can then build an application
# create an example project
oc new-project example
# start a new application
oc process -f startx-apache-build-template \
-p APP_NAME=myapp \
| oc create -f -
Openshift deploy template
Openshift cluster administrator can add a deploy template to their consumers.
As an administrator, you can import our openshift deploy template
in your openshift
project.
You must be cluster-admin to add this image to the openshift
project. If not, you can add it to your own
project (skip the oc project openshift
command in the next script)
# swith to the openshift project
oc project openshift
# Add this template to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/apache/openshift-template-deploy.yml
You can then deploy an application
# create a example project
oc new-project example
# start a new application
oc process -f startx-apache-deploy-template \
-p APP_NAME=myapp \
| oc create -f -
Using this image as S2I builder
Create your local project (skip if you already are in a project diretory with a run
bash script)
# Create a project directory
mkdir example-project
cd example-project
# create a run script
cat << "EOF"
<html><head></head><body><h1>My Web Application</h1></body></html>
EOF > index.html
Then you can use this image as an s2i builder image
# With your current directory application code
s2i build . startx/sv-apache:latest startx-apache-myapp
docker run --rm -d -p 9201:8080 startx-apache-myapp
# With startx application sample code repository
s2i build https://gitlab.com/startx1/containers-example-apache startx/sv-apache startx-apache-sample
docker run --rm -d -p 9201:8080 startx-apache-sample
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/apache:latest
#... your container specifications
Environment variable
Variable | Type | Default | Description |
---|---|---|---|
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/sv-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 |
Container command
Variable | Description |
---|---|
assemble | Execute the build script on \$APP_PATH application |
post-build | Execute the post-build script |
pre-deploy | Execute the pre-deployment script |
post-deploy | Execute the post-deployment script |
run | Start the application |
isLive | Execute the liveness-probe script |
isReady | Execute the readyness-probe script |
info | Get information about the sx-apache script |
usage | Get the usage message |
version | Get information about the sx-apache version |
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 Services/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 Services/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