A collection of Dockerfiles for different versions of a very barebones PHP.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
php-4.0.6 Update to a single-step build process with actual images. Dec 21, 2016
php-4.1.0 Update to a single-step build process with actual images. Dec 21, 2016
php-4.1.1 Update to a single-step build process with actual images. Dec 21, 2016
php-4.1.2
php-4.2.0
php-4.2.1 Update to a single-step build process with actual images. Dec 21, 2016
php-4.2.2
php-4.2.3 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.0 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.1 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.10 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.11
php-4.3.2
php-4.3.3
php-4.3.4 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.5 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.6 Update to a single-step build process with actual images. Dec 21, 2016
php-4.3.7
php-4.3.8
php-4.3.9 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.0 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.1 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.2
php-4.4.3
php-4.4.4
php-4.4.5
php-4.4.6 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.7 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.8 Update to a single-step build process with actual images. Dec 21, 2016
php-4.4.9
php-5.0.0 Update to a single-step build process with actual images. Dec 21, 2016
php-5.0.1 Update to a single-step build process with actual images. Dec 21, 2016
php-5.0.2
php-5.0.3 Update to a single-step build process with actual images. Dec 21, 2016
php-5.0.4
php-5.0.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.1.0
php-5.1.1
php-5.1.2
php-5.1.3 Update to a single-step build process with actual images. Dec 21, 2016
php-5.1.4
php-5.1.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.1.6
php-5.2.0 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.1 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.10 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.11 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.12
php-5.2.13
php-5.2.14 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.15
php-5.2.16
php-5.2.17 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.2
php-5.2.3
php-5.2.4 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.2.6
php-5.2.8
php-5.2.9
php-5.3.0 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.1
php-5.3.10
php-5.3.11 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.12
php-5.3.13
php-5.3.14 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.15
php-5.3.16
php-5.3.17 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.18
php-5.3.19
php-5.3.2 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.20 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.21 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.22 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.23 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.24 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.25
php-5.3.26
php-5.3.27
php-5.3.28 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.29 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.3
php-5.3.4
php-5.3.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.6
php-5.3.7
php-5.3.8 Update to a single-step build process with actual images. Dec 21, 2016
php-5.3.9 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.0
php-5.4.1 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.10 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.11 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.12 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.13
php-5.4.14
php-5.4.15 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.16 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.17 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.18 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.19 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.2
php-5.4.20
php-5.4.21
php-5.4.22 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.23 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.24
php-5.4.25 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.26 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.27 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.28 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.29
php-5.4.3 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.30
php-5.4.31
php-5.4.32
php-5.4.33
php-5.4.34
php-5.4.35 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.36 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.37
php-5.4.38 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.39
php-5.4.4
php-5.4.40 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.41
php-5.4.42 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.43 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.44 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.45 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.5
php-5.4.6 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.7 Update to a single-step build process with actual images. Dec 21, 2016
php-5.4.8
php-5.4.9 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.0
php-5.5.1 Fix some incorrect md5sums. Dec 22, 2016
php-5.5.10 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.11
php-5.5.12 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.13 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.14
php-5.5.15
php-5.5.16 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.17 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.18 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.19
php-5.5.2 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.20 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.21
php-5.5.22 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.23 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.24 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.25 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.26
php-5.5.27
php-5.5.28 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.29
php-5.5.3 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.30
php-5.5.31
php-5.5.32 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.33 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.34 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.35
php-5.5.36
php-5.5.37
php-5.5.38
php-5.5.4
php-5.5.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.6 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.7
php-5.5.8 Update to a single-step build process with actual images. Dec 21, 2016
php-5.5.9 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.0 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.1 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.10 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.11
php-5.6.12 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.13
php-5.6.14
php-5.6.15
php-5.6.16
php-5.6.17 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.18 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.19
php-5.6.2 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.20 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.21
php-5.6.22 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.23 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.24 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.25
php-5.6.26 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.27 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.28 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.29 Add php-5.6.29. Jul 13, 2017
php-5.6.3
php-5.6.30 Add php-5.6.30. Jul 13, 2017
php-5.6.31 Add php-5.6.31. Jul 13, 2017
php-5.6.4 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.5 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.6
php-5.6.7 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.8 Update to a single-step build process with actual images. Dec 21, 2016
php-5.6.9
php-7.0.0
php-7.0.1 Update to a single-step build process with actual images. Dec 21, 2016
php-7.0.10
php-7.0.11
php-7.0.12 Update to a single-step build process with actual images. Dec 21, 2016
php-7.0.13 Update to a single-step build process with actual images. Dec 21, 2016
php-7.0.14 Add php-7.0.14. Jul 13, 2017
php-7.0.15 Add php-7.0.15. Jul 13, 2017
php-7.0.16
php-7.0.17
php-7.0.18 Add php-7.0.18. Jul 13, 2017
php-7.0.19 Add php-7.0.19. Jul 13, 2017
php-7.0.2
php-7.0.20 Add php-7.0.20. Jul 13, 2017
php-7.0.21
php-7.0.3
php-7.0.4 Update to a single-step build process with actual images. Dec 21, 2016
php-7.0.5
php-7.0.6
php-7.0.7
php-7.0.8
php-7.0.9
php-7.1.0
php-7.1.1 Add php-7.1.1. Jul 13, 2017
php-7.1.2
php-7.1.3 Add php-7.1.3. Jul 13, 2017
php-7.1.4 Add php-7.1.4. Jul 13, 2017
php-7.1.5
php-7.1.6 Add php-7.1.6. Jul 13, 2017
php-7.1.7 Add php-7.1.7. Jul 13, 2017
.gitignore Initial commit of php 5.5 builds. Aug 3, 2014
LICENSE
README.md
docker-compose.yml

README.md

docker-php-minimal

A collection of Dockerfiles for different versions of a very barebones PHP.

Purpose

These docker images provide a minimalistic version of PHP for a large number of PHP versions. The built PHP is not your typical PHP as it is built as follows:

  • All optional extensions are not built or included.
  • The following functions are disabled from running: system, shell_exec, passthru, proc_open, popen, and ini_set.
  • Error display is turned off but errors are logged instead.
  • A 1MB memory limit is enforced.
  • URL and file opening is disabled.

This provides a locked down PHP that should be unable to escape and do anything nasty on the system, especially if combined with limits on CPU usage, execution time, etc. Most of these restrictions can be easily modified via modifying the php.ini.

Usage

Building a docker image with any PHP version is simple. For example, to build php 5.6.0:

docker build --tag php-5.6.0 php-5.6.0
docker run -i -t --rm php-5.6.0 php -i

Using docker-compose

Alternatively, if you have docker-compose installed, you can run the above steps like this instead:

docker-compose run php560 php -i

Permissions

Because the container runs as a non-root user, you may run into permission problems when using volume mounts to your host. The build user used in the container is uid/gid 1000, so you may need to provide write access to that user to any files/directories that need to be written to. For example:

chgrp 1000 .
chmod g+w .

License

docker-php-minimal is licensed under the MIT license. See LICENSE for the full license text.