Sign inSign up

tavib47/php-ci

By tavib47

•Updated 8 months ago

Alpine PHP image for CI/CD with Composer, Git, and Node.js

Image
Integration & delivery
0

2.0K

tavib47/php-ci repository overview

⁠PHP CI Base Image

Docker Hub Image Size

A lightweight Alpine-based PHP image optimized for CI/CD pipelines, bundling PHP with Composer, Git, and Node.js.

⁠Features

  • PHP with zip extension
  • Composer (latest)
  • Git
  • Node.js with npm and npx
  • curl, wget, zip, unzip

⁠Supported Tags

TagPHPNode.js
8.5, latest8.522
8.48.422
8.38.322
8.28.222
8.18.122
<php>-node248.1-8.524
<php>-node228.1-8.522
<php>-node208.1-8.520
<php>-node188.1-8.518

Examples: 8.4-node24, 8.4-node20, 8.3-node18

⁠Usage

docker pull tavib47/php-ci:8.4
docker run -v $(pwd):/app -w /app tavib47/php-ci:8.4 composer install
⁠GitLab CI
image: tavib47/php-ci:8.4

stages:
  - build
  - test

build:
  stage: build
  script:
    - composer install
    - npm install
    - npm run build

test:
  stage: test
  script:
    - ./vendor/bin/phpunit
⁠GitHub Actions
jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: tavib47/php-ci:8.4
    steps:
      - uses: actions/checkout@v4
      - run: composer install
      - run: npm install && npm run build
      - run: ./vendor/bin/phpunit
⁠Multi-Version Testing
# GitLab CI
.test:
  script:
    - composer install
    - ./vendor/bin/phpunit

test:php8.3:
  extends: .test
  image: tavib47/php-ci:8.3

test:php8.4:
  extends: .test
  image: tavib47/php-ci:8.4

test:node20:
  extends: .test
  image: tavib47/php-ci:8.4-node20

⁠Source

GitHub Repository⁠

Tag summary

Content type

Image

Digest

sha256:8e62bcb1b…

Size

90.7 MB

Last updated

8 months ago

docker pull tavib47/php-ci