Base docker image to run PHP applications on Apache
To create the base image cloudaku/docker-php, execute the following command on the tutum-docker-php folder:
docker build -t cloudaku/docker-php .
Start your image binding the external ports 80 in all interfaces to your container:
docker run -d -p 80:80 cloudaku/docker-php
Test your deployment:
curl http://localhost/
Hello world!
This image can be used as a base image for your PHP application. Create a new Dockerfile in your
PHP application folder with the following contents:
FROM cloudaku/docker-php
After that, build the new Dockerfile:
docker build -t username/my-php-app .
And test it:
docker run -d -p 80:80 username/my-php-app
Test your deployment:
curl http://localhost/
That's it!
Create a Dockerfile like the following:
FROM cloudaku/docker-php
RUN apt-get update && apt-get install -yq git && rm -rf /var/lib/apt/lists/*
RUN composer install
Replacing git with any dependencies that your composer packages might need.
Content type
Image
Digest
sha256:ecfb29485…
Size
157.3 MB
Last updated
almost 11 years ago
docker pull cloudaku/docker-php