Docker + PHP 8.5
This repo builds the mgldvd/alpine-php85 Docker image on top of alpine:latest, adding Bash tooling and PHP 8.5.
โ ๏ธ Warning: The GitHub Action rebuilds and republishes the image every Sunday to keep it up to date with the latest PHP 8.5 version.

Single Dockerfile using Alpine + Vim, published by the GitHub Actions workflow on deploy/hub.
apk addbashsudocurlneovimcoreutilsphp85php85-cliphp85-fpmphp85-mbstringphp85-curlphp85-zipphp85-xmlphp85-domphp85-pdophp85-pdo_mysql| Tag | Description |
|---|---|
latest | Most recent successful build on deploy/hub |
docker run --rm -it -v "$PWD:/app" mgldvd/alpine-php85 bash
# inside the container shell
echo "<?php echo 'hello from alpine-php85'.PHP_EOL;" > hello.php
php ./hello.php
<?php
$result = " hello world from alpine-php85 "
|> trim(...)
|> strtoupper(...);
echo $result; // "HELLO WORLD FROM ALPINE-PHP85"
|>Clone the project and build the image using the provided Dockerfile:
git clone https://github.com/Mgldvd-Docker/alpine-php85.git
cd alpine-php85
docker build -t mgldvd/alpine-php85:local .
Run the container to verify the build:
docker run --rm -it -v "$PWD:/app" mgldvd/alpine-php85:local bash
Use the bundled compose.ymlโ to launch an interactive shell with your local app/ directory mounted into the container:
mkdir app
wget https://raw.githubusercontent.com/Mgldvd-Docker/alpine-php85/refs/heads/master/compose.yml
or create file: compose.yml
services:
app:
image: mgldvd/alpine-php85
command: bash
volumes:
- ./app:/app
stdin_open: true
tty: true
restart: "no"
docker compose run --rm app
To keep the container running in the background instead, start it detached and exec into it when needed:
docker compose up -d
docker compose exec app bash
The GitHub Actions workflow at .github/workflows/docker-publish.yml automates image publication. It performs the following steps:
latest tag.Add the following secrets in the GitHub repository settings before running the workflow:
DOCKERHUB_USERNAME: Docker Hub account name (e.g., mgldvd).DOCKERHUB_TOKEN: Docker Hub access token with permission to push the repository.Push commits to the deploy/hub branch or run the workflow manually from the GitHub Actions tab to build and publish a new image version.
Issues and pull requests are welcome. Please open a discussion in the GitHub repository if you plan substantial changes so proposals can be coordinated with the publishing workflow.
Content type
Image
Digest
sha256:bf5c4efb1โฆ
Size
25.4 MB
Last updated
1 day ago
docker pull mgldvd/alpine-php85