Image runner-PHP

STARTX Profile licence Sources last commit Build Status Dockerhub Registry Docker php pulls Docker Repository on Quay

Startx php is a base container used for dynamic 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)
  • PHP and php-fpm (PHP 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 :

See more applications builders and sample on startx docker images repository

Container flavours

Docker Hub repository Content PHP Apache
startx/runner-php:latest Fedora core rawhide
startx/runner-php:35 Fedora core 35
startx/runner-php:34 Fedora core 34
startx/runner-php:33 Fedora core 33 7.4.19 2.4.46
startx/runner-php:32 Fedora core 32 7.3.8 2.4.46
startx/runner-php:31 Fedora core 31 7.3.24 2.4.46
startx/runner-php:30 Fedora core 30 7.3.1 2.4.39
startx/runner-php:29 Fedora core 29 7.2.20 2.4.39
startx/runner-php:28 Fedora core 28 5.6.16 2.4.17
startx/runner-php:27 Fedora core 27 5.6.16 2.4.17
startx/runner-php:centos8 Centos 8
startx/runner-php:centos7 Centos 7
startx/runner-php:ubi8 RedHat UBI 8
startx/runner-php:alpine3 Alpine 3.12 7.2.5 2.4.33

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 9213:8080 --name="example-php" startx/runner-php
  • Connect to your local application
firefox http://localhost:9213

Running using docker-compose

  • Create a docker-compose.yml file with the following content
php:
  image: startx/runner-php:latest
  container_name: "example-php"
  ports:
    - "9213:8080"
  • Execute the following command
docker-compose up -d
docker-compose logs
  • Connect to your local application
firefox http://localhost:9213

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-php: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 php Define the type of service or application provided
SX_ID auto startx/runner-php 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

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

  1. Jump into the container directory with cd GitlabRunner/php
  2. Build the container using docker build -t startx-php .
  3. Run this container
  4. Interactively with docker run -it startx-php. 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,...)
  5. As a daemon with docker run -d -p 9213:8080 startx-php

Build & run a container using docker-compose

  1. Jump into the container directory with cd GitlabRunner/php
  2. Run this container
  3. Interactively with docker-compose up Startup logs appears and escaping this command stop the container
  4. As a daemon with docker-compose up -d. Container startup logs can be read using docker-compose logs