PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language. PHP can be added to straight HTML or it can be used with a variety of templating engines and web frameworks. PHP code is usually processed by an interpreter, which is either implemented as a native module on the web-server or as a common gateway interface (CGI).
Pull the image from the Container registry. This is the recommended method of installation as it is easier to update image.
docker pull ghcr.io/slavcodev/docker-php:latestBuild the image locally
git clone git@github.com:slavcodev/docker-php.git
cd docker-php
docker build . --file Dockerfile \
--tag ghcr.io/slavcodev/docker-php \
--build-arg PHP_VERSION=8.3-fpmUsing docker-compose.yml
services:
php:
image: ghcr.io/slavcodev/docker-php:latest
user: ${USER_ID}:${GROUP_ID}
working_dir: /var/www/html
volumes:
- ${APP_COMPOSER_CACHE}:/home/.composer/cache
- ${APP_SRC}:/var/www/html
extra_hosts:
- "host.docker.internal:host-gateway"Alternately, you can manually launch the container.
docker run --name='php' \
ghcr.io/slavcodev/docker-php:latestThe image is hosted on Container registry.
Read the Working with the Container registry to learn how to publish new version of image.
There is an example:
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
docker push -a ghcr.io/slavcodev/docker-php