Sign inSign up

cikupin/php-apache2

By cikupin

Updated over 7 years ago

php-apache2 docker image

Image
1

1M+

cikupin/php-apache2 repository overview

Homepage: (https://github.com/cikupin/docker-lampp)
Where to file issues: (https://github.com/cikupin/docker-lampp/issues)
Changelog: (https://github.com/cikupin/docker-lampp/blob/master/CHANGELOG.md)

Table of contents

Installation

To use this image, you may choose one of these steps: build image from Dockerfile or pull docker image from docker hub.

1. Build image from Docker file

First, clone Dockerfile from this github repository:

https://github.com/cikupin/docker-lampp

Go to Build/ subdirectory, then build the image by using this command:

docker build -t cikupin/php-apache2:latest .
2. Pull docker image from docker hub

If you don't want to build the image manually, you can pull it from my docker hub repository.

docker pull cikupin/php-apache2

Usage

To run this images, type this command:

docker run -d --rm -p 80:80 -v /var/www/html:/var/www/html cikupin/php-apache2:latest
Mounting volume

Data in container will be deleted automatically when you remove container. In order to keep your data from container although you had deleted your container, you need to mount your folder in your container to your local machine. That's why I put -v /var/www/html:/var/www/html when I run my container.

-v /var/www/html:/var/www/html means that you mount/sync /var/www/html folder (before :) in your local machine to /var/www/html (after :) into your container.

When you delete your container, your data still exists in your local machine. You can reuse your data for another container my mounting them. So that you don't need to worry about losing your data.

Complete LAMPP Stack

To implement this mage into complete LAMPP stack, please refers to my github page https://github.com/cikupin/docker-lampp.

Tag summary

Content type

Image

Digest

Size

390.8 MB

Last updated

over 7 years ago

docker pull cikupin/php-apache2