Public Repository

Last pushed: 4 months ago
Short Description
Base docker image for ARM to run PHP applications on Apache
Full Description

Base docker image to run PHP applications on Apache

| GitLab Repo | | | |

Installing your PHP application

To install your application, copy your code inside the image in /app. For example, if using git:

docker run -d klud/apache-php:raspbian git clone https://gitlab.com/klud/hello-world-php.git /app

It will print the new container ID (like d35bf1374e88). To create an image from that, execute:

docker commit d35bf1374e88 klud/hello-world-php

You can now push your changes to the registry:

docker push klud/hello-world-php

Running your PHP application

Pull your container if it's not yet on your local docker machine:

docker pull klud/hello-world-php

Run the /run.sh script to start apache (via supervisor):

docker run -d -p 80 klud/hello-world-php /run.sh

It will print the new container ID (like d35bf1374e88). Get the allocated external port:

docker port d35bf1374e88 80

It will print the allocated port (like 4751). Test your deployment:

curl http://localhost:4751/

Hello world!

Docker Pull Command
Owner
klud

Comments (0)