https://github.com/gmitirol/alpine38-php56
Alpine 3.8 Docker image with PHP 5.6
https://github.com/gmitirol/alpine38-php56
alpine alpine-linux docker docker-image php php56
Last synced: 5 months ago
JSON representation
Alpine 3.8 Docker image with PHP 5.6
- Host: GitHub
- URL: https://github.com/gmitirol/alpine38-php56
- Owner: gmitirol
- License: lgpl-3.0
- Created: 2019-04-29T13:23:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T06:48:39.000Z (about 5 years ago)
- Last Synced: 2025-06-25T05:38:58.437Z (12 months ago)
- Topics: alpine, alpine-linux, docker, docker-image, php, php56
- Language: Shell
- Size: 777 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Docker image for PHP 5.6
========================
Provides a PHP 5.6 docker image based on our [Alpine Linux 3.8 base image](https://github.com/gmitirol/alpine38).
As opposed to the PHP 7 images, this one lacks the Memcached extension as it is not available for PHP 5.6 on Alpine.
This image can be used as a base for the testing and deployment of PHP applications.
To build the docker image, do not forget to adapt the base image version in `Dockerfile` where necessary.
Included scripts:
| Script | Purpose |
| -------------------------- | -------------------------------------------------------------------------- |
| `php-ext.sh` | Enables, disables or shows PHP extensions |
| `php-extensions.sh` | Provides helper functions for getting available and default PHP extensions |
| `setup-gitlab-token-auth.sh` | Configures git and composer authentication via GitLab CI token |
| `setup-nginx.sh` | Configures the built-in nginx web server |
Included tools:
| Tool | Description | Website |
| ------- | ------------------------------ | --------------------------------------------- |
| `sami` | Sami API documentation generator | https://github.com/FriendsOfPHP/Sami |
| `phpcs` | PHP CodeSniffer | https://github.com/squizlabs/PHP_CodeSniffer/ |
For running the PHP applications, a locked default user `project` with UID 1000 is created.
Usage example (with custom GitLab server)
-----------------------------------------
```yaml
# .gitlab-ci.yml
stages:
- test
test:
stage: test
image: gmitirol/alpine38-php56:v1
artifacts:
expire_in: 1 hour
name: "$CI_PROJECT_PATH_SLUG-$CI_PIPELINE_ID"
paths:
- build/coverage
- build/doc
script:
- php-ext.sh enable 'xdebug'
- setup-gitlab-token-auth.sh "$CI_JOB_TOKEN" "gitlab.example.com"
- composer install --no-progress
- phpcs $CI_PROJECT_DIR/src $CI_PROJECT_DIR/tests --standard=PSR2
- php vendor/bin/phpunit $CI_PROJECT_DIR/tests --coverage-text -vv --colors=never
- sami update sami.php
tags:
- shared
```