The Lagoon php-cli
Docker image. Based on Lagoon php-fpm
image, it has all the needed command line tools for daily operations.
Containers (or pods) started from cli
images are responsible for building code for Composer or Node.js based projects.
The image also contains database cli
s for both MariaDB and PostgreSQL.
This Dockerfile is intended to be used as a base for any cli
needs within Lagoon.
5.6 (available for compatibility, no longer officially supported)
7.0 (available for compatibility, no longer officially supported)
7.2 (available for compatibility, no longer officially supported)
7.3 [Dockerfile]​
7.4 [Dockerfile]​
8.0 (coming soon)
All PHP versions use their own Dockerfiles.
This image is prepared to be used on Lagoon. There are therefore some things already done:
Folder permissions are automatically adapted with fix-permissions
, so this image will work with a random user.
COMPOSER_ALLOW_SUPERUSER=1
removes warning about use of Composer as root.
80-shell-timeout.sh
script checks if containers are running in a Kubernetes environment and then set a 10 minutes timeout to idle cli
pods.
cli
containers use an SSH key injected by Lagoon or defined into SSH_PRIVATE_KEY
environment variable.
The included cli tools are:
​composer
version 1.9.0 (changeable via COMPOSER_VERSION
and COMPOSER_HASH_SHA256
)
​node.js
verison 12 (as of Jan 2020)
​npm
​
​yarn
​
mariadb-client
postgresql-client
By default this image ships with the current Node.js Version (v12 as of Jan 2020). If you need another version you can remove the current version and install the one of your choice.
Environment variables allow some configuration to be customised in a repeatable way.
Name | Default | Description |
| 64M | Controls the max allowed packet for the MySql client. |
Environment variables can be changed in the docker-compose.yml
file.
x-environment:&default-environmentMARIADB_MAX_ALLOWED_PACKET: 128M​service:cli:environment:<< : *default-environment