Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilyes512/php81
A PHP 8.1 FPM and Apache based Docker base image
https://github.com/ilyes512/php81
apache docker php81
Last synced: 26 days ago
JSON representation
A PHP 8.1 FPM and Apache based Docker base image
- Host: GitHub
- URL: https://github.com/ilyes512/php81
- Owner: Ilyes512
- License: mit
- Created: 2024-02-22T17:50:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-30T08:37:39.000Z (about 1 month ago)
- Last Synced: 2024-10-12T12:42:05.840Z (26 days ago)
- Topics: apache, docker, php81
- Language: Dockerfile
- Homepage:
- Size: 158 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php81
[![Build Images](https://github.com/Ilyes512/php81/actions/workflows/main.yml/badge.svg)](https://github.com/Ilyes512/php81/actions/workflows/main.yml)
A PHP 8.1 (FPM and Apache) based Docker base image.
## Pulling the images
```
docker pull ghcr.io/ilyes512/php81:runtime-latest
docker pull ghcr.io/ilyes512/php81:builder-latest
docker pull ghcr.io/ilyes512/php81:builder-nodejs-latest
docker pull ghcr.io/ilyes512/php81:vscode-latestdocker pull ghcr.io/ilyes512/php81/apache:runtime-latest
docker pull ghcr.io/ilyes512/php81/apache:builder-latest
docker pull ghcr.io/ilyes512/php81/apache:builder-nodejs-latest
docker pull ghcr.io/ilyes512/php81/apache:vscode-latest
```The tag scheme: `{TARGET}-{VERSION}`
- **{TARGET}**: `runtime`, `builder`, `builder_nodejs` or `vscode`
- **{VERSION}**: `latest` or tag i.e. `1.0.0`## Building the docker image(s)
There are multiple targets:
- **runtime**: this is for *production*. It does not contain any development tools like Composer and Xdebug.
- **builder**: this is for *development*. This is based on the runtime-target and it adds Composer, Xdebug etc.
- **builder_nodejs**: this is for *development*. This is based on the builder-target and it adds NodeJS.
- **vscode**: this is for *development* using
[VS Code Remote](https://code.visualstudio.com/docs/remote/remote-overview). This is based on the
`builder_nodejs`-target and adds some VS Code deps.Building `runtime`-target:
```
docker build --tag ghcr.io/ilyes512/php81:runtime-latest --file fpm/Dockerfile --target runtime .
```Building `builder`-target:
```
docker build --tag ghcr.io/ilyes512/php81:builder-latest --file fpm/Dockerfile --target builder .
```Building `builder_nodejs`-target:
```
docker build --tag ghcr.io/ilyes512/php81:builder-nodejs-latest --file fpm/Dockerfile --target builder_nodejs .
```Building `vscode`-target:
```
docker build --tag ghcr.io/ilyes512/php81:vscode-latest --file fpm/Dockerfile --target vscode .
```## Task commands
Available [Task](https://taskfile.dev/#/) commands:
```
* build: Build all PHP Docker image targets of both the FPM and Apache variants
* build:apache: Build all PHP Docker image targets of the Apache variant
* build:fpm: Build all PHP Docker image targets of the FPM variant
* lint:apache: Apply a Dockerfile linter (https://github.com/hadolint/hadolint)
* lint:fpm: Apply a Dockerfile linter (https://github.com/hadolint/hadolint)
* shell:apache: Interactive shell
* shell:fpm: Interactive shell
```