Deploy Variant (8.4-deploy)
The default php-ci tags (:8.4, :8.3, …) are intentionally lean: PHP, Composer,
and CI utilities only. Deploy tooling lives in a separate opt-in image so test
jobs do not pay for tools they never use.
Tags
| Image tag | Contents | Mutability |
|---|---|---|
himanshuramavat/php-ci:8.4-deploy | PHP 8.4 stack + rsync + openssh-client | Rolling |
himanshuramavat/php-ci:8.4-deploy-v<x.y.z> | Same, pinned to a release | Immutable |
GHCR mirror: ghcr.io/himanshuramavat/php-ci:8.4-deploy
docker pull himanshuramavat/php-ci:8.4-deploy
The deploy variant is published for PHP 8.4 only. Use :8.4 for test/lint jobs
and :8.4-deploy only in deploy stages. Additional PHP lines may follow if there
is demand.
When to use it
| Job type | Image |
|---|---|
| PHPUnit, PHPStan, PHPCS, Composer install | :8.4 (default) |
| rsync / SCP artifacts to a remote host over SSH | :8.4-deploy |
Common in TYPO3 pipelines: run tests on :8.4, then rsync public/, vendor/,
or a release tarball to staging/production from a dedicated deploy job.
Verify tools
docker run --rm himanshuramavat/php-ci:8.4-deploy bash -c '
rsync --version
ssh -V
php --version
composer --version
'
GitLab CI example
Keep test and deploy on separate images:
stages:
- test
- deploy
phpunit:
stage: test
image: himanshuramavat/php-ci:8.4
script:
- composer install --prefer-dist --no-interaction
- ./vendor/bin/phpunit
deploy:production:
stage: deploy
image: himanshuramavat/php-ci:8.4-deploy
rules:
- if: '$CI_COMMIT_TAG'
script:
- composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader
- rsync -avz --delete -e ssh ./public/ "${DEPLOY_USER}@${DEPLOY_HOST}:/var/www/html/public/"
Store DEPLOY_USER, DEPLOY_HOST, and SSH private keys in GitLab CI/CD variables.
Mount or write the key in before_script before calling rsync.
GitHub Actions example
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/himanshuramavat/php-ci:8.4
steps:
- uses: actions/checkout@v4
- run: composer install --prefer-dist --no-interaction
- run: ./vendor/bin/phpunit
deploy:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
container:
image: ghcr.io/himanshuramavat/php-ci:8.4-deploy
steps:
- uses: actions/checkout@v4
- run: composer install --no-dev --prefer-dist --optimize-autoloader
- run: rsync -avz --delete -e ssh ./public/ "${DEPLOY_USER}@${DEPLOY_HOST}:/var/www/html/public/"
Pinning releases
For production deploy pipelines, pin an immutable tag from the php-ci Releases page:
image: himanshuramavat/php-ci:8.4-deploy-v1.5.0
Or pin by digest — see Installation → Pin to an immutable digest.
Build your own
The deploy image is the deploy target in the php-ci Dockerfile:
docker build --target deploy --build-arg PHP_VERSION=8.4 -t php-ci:8.4-deploy .
If you need extra deploy tools (e.g. lftp, sshpass), extend this variant in your
own Dockerfile rather than adding them to the shared base image. See
Use as a base image.
Related
- Docker Tags — full tag matrix and registries
- TYPO3 — extension CI and deploy notes
- Included Tools — default vs deploy tooling