Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Ghifari160/docker-apache-php55

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Better PHP Image for Docker

Docker Hub: ghifari160/apache-php55

This image is not just another PHP5.5 image for Docker.

Looking for a PHP5.6 image for Docker? Checkout ghifari160/apache-php56!

Why use this image

This image is based on ghifari160/apache, which forces Apache to run in the foreground and output its log into the container's stdio.

Warnings

  • PHP5.5 has reached its End of Life, it should not be used on a production environment. This image utilizes PHP5.5.38. The use of this image on a production server is ill advised. Use at your own risk.
  • Reliable PHP5.5 binaries are no longer available on any package manager. This image builds PHP5.5 binaries during the build process. Build tools and their dependencies are installed purely to build the binaries. They are removed after the binaries are built, installed, and configured.

Installation

By default this image should be run as a daemon.

docker run -d -p 8080:80 ghifari160/apache-php55

However, this image may be run in the foreground for debugging purposes.

docker run -it -p 8080:80 ghifari160/apache-php55

Further configurations

Name your container

Use the parameter --name=<name> to name the container. Example:

docker run --name=apache-php55 -d ghifari160/apache-php55

Run your code from a folder on the host computer

Use the parameter -v /path/on/the/host/computer:/var/www/html to run codes from the host computer. Example:

docker run -d -v /d/workspace/project:/var/www/html ghifari160/apache-php55

Change the port on the container

Use the parameter -p <port on the host>:80 to map the container's port to another port on the host computer. Example:

docker run -d -p 8080:80 ghifari160/apache-php55

macOS permission fixes

On macOS, shared volumes remains owned by the host user and group. Permissions on these shared volumes are also determined by the host, unchangeable from guest. On the home directory, the default owner and permission are <user>:staff and 755. Apache needs write access to its files and directories. A workaround is to set the www-data UID and GID to 1000 and 50. The init script will do this if the value of G16_MACOS is yes. Use the parameter -e G16_MACOS=yes to enable this workaround. Example:

docker run -d -e G16_MACOS=yes ghifari160/apache-php55

Tags

Tags Ubuntu Version Size
16.04 xenial 16.04
17.10 artful 17.10 NOT SUPPORTED
latest 18.04 bionic 18.04
devel 18.10 cosmic 18.10 NOT SUPPORTED