Sign inSign up

ghifari160/apache-php56

By ghifari160

•Updated about 7 years ago

Apache 2 and PHP 5.6 on Ubuntu

Image
0

10K+

ghifari160/apache-php56 repository overview

⁠A Better PHP Image for Docker

Docker Hub: ghifari160/apache-php56

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

Looking for a PHP5.5 image for Docker? Check ghifari160/apache-php55⁠.

⁠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.

⁠Installation

By default, this image should be run as a daemon.

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

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

docker run -i -p 8080:80 ghifari160/apache-php56
⁠Further Configurations
⁠Name your container

Add this parameter: --name <name>
Example:

docker run --name apache-php56 -d -p 8080:80 ghifari160/apache-php56
⁠Run your code from a folder on the host computer

Add this parameter: --v /path/on/the/host/computer:/var/www/html
Example:

docker run -v -d -p 8080:80 /d/workspace/project:/var/www/html ghifari160/apache-php56
⁠Change the port on your 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-php56
⁠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

⁠Tags

TagsUbuntu VersionSize
16.04 xenial16.04
17.10 artful17.10NOT SUPPORTED
latest 18.04 bionic18.04

Tag summary

Content type

Image

Digest

Size

109.5 MB

Last updated

about 7 years ago

docker pull ghifari160/apache-php56