Public Repository

Last pushed: a day ago
Short Description
Images with the latest PHP versions, meant for continuous integration (CI).
Full Description

PHP Images for CI

This is an example of how you compile software meant to be later part of a Docker image, but doing so outside of the image itself. This results in cleanly built images without unnecessary artifacts.

I use this container image(s) to test PHP scripts of mine.


https://github.com/wmark/docker-ci-php

  • 5.5:
  • 5.6:
  • 7.0:
  • 7.1:

Motivation

  • The "official" images are bloated, and a butchery.
  • I strongly disliked that the usual third-party CI services take minutes until picking up jobs, and hence use my own CI/CD setup powered by Docker.
  • I want to show you a better way of building software out-of-Dockerfiles for containers.

How It's Done

Automated

Gitlab-CI (could be any other CI) reads the commands from the supplied
.gitlab-ci.yml file. That is, for every stage a new container is started
and lines '*script' are run one by one.

The default image is blitznote/debootstrap-amd64:16.04 (Ubuntu 16.04.1)
with gcc build-essentials.

Manually

It's, for the first stage build:

docker run -v $(pwd):/data -ti --rm \
  --tmpfs /tmp:exec,mode=1777 \
  blitznote/debootstrap-amd64:16.04

… when inside the container:

apt-get -q update
apt-get -y install gcc build-essentials xz-utils

cd /data
./compile.sh
./make-debs.sh

Stage test is a dummy.

Contact the Author

Mark on Twitter
… and Github

Docker Pull Command
Owner
blitznote

Comments (0)