Sign inSign up

humanmade/altis-local-server-php

By humanmade

•Updated 7 days ago

Image
1

100K+

humanmade/altis-local-server-php repository overview

Human Made Docker PHP Container
Docker configuration for building a PHP container
A Human Made⁠ project. Maintained by @nathanielks and @joehoyle.

⁠Overview

⁠Features

This container is compiled with the following additional resources:

  • XHProf
  • PHP's V8 extension
  • Cavalcade
  • WP CLI

It's currently configured to communicate via TCP port 9000.

⁠Release Management

In order to facilitate backporting non-breaking changes across various minor versions, we use the following branching and build strategy:

  • The master branch tracks the latest stable changes. It is not built.
  • Version branches named v<major>.<minor>-branch (eg v3.0-branch, v3.1-branch, etc) are the authoritative source for that version. These branches are built.

When submitting pull requests, use master as the base branch and add labels for Backport bot to merge changes into the desired version branches. For instance, when changes need to be made to the 3.0 version branch, use master as the Pull Request base branch and add the backport v3.0-branch label to the Pull Request.

In the event Backport is unable to apply changes to an older version branch, you will need to submit a Pull Request to the version branch directly.

⁠Mcrypt support

As Mcrypt was EOL'd in PHP 7.2, we manually install it in order to support older applications who have not yet integrated OpenSSL support in their application.

⁠Building PHP

This container inherits from the Official PHP container's⁠ Alpine variant. The Dockerfile is configured to allow Docker build arguments to define which version of PHP you wish to install. Should you wish to specify a different version than the default PHP 7.2, you can add a build argument like so:

docker build --build-arg FROM_PHP=7.3-rc -t php .

This will select the 7.3 release candidate tag.

The FROM definition is dynamic, as it's composed of two build arguments: FROM_PHP and FROM_ALPINE:

ARG FROM_PHP=7.2
ARG FROM_ALPINE= # We leave Alpine blank as it's not required, but can be used
FROM php:${FROM_PHP}-fpm-alpine${FROM_ALPINE}

FROM_ALPINE is intentionally left blank so as to allow Docker to choose the appropriate image tag for the version of PHP we wish to build from. You can view the list of tags for the Official PHP Container here⁠.

⁠Building V8

The default version of libv8 is 6.6. The compilation process for libv8 is complicated and time-consuming. Instead of self-compiling, we take advantage of Alex Masterov's alpine-v8⁠ image and multi-stage Docker builds⁠. This enables us to to copy a pre-built archive of libv8 without any of the time spent or complexity of building it ourselves. Here's a thread⁠ documenting building V8 for Alpine Linux and why there's a resulting Docker image.

Tag summary

Content type

Image

Digest

sha256:2879f7c61…

Size

163.4 MB

Last updated

15 days ago

docker pull humanmade/altis-local-server-php