Skip to content

Commit

Permalink
update image labels
Browse files Browse the repository at this point in the history
  • Loading branch information
yosrib committed May 29, 2023
1 parent 900f482 commit b272f5e
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- main
paths:
- Dockerfile
- .docker/
- .docker/**
- .github/workflows/build.yaml

permissions:
contents: 'read'
Expand Down Expand Up @@ -41,7 +42,6 @@ jobs:
- name: Process builder
shell: bash
run: |
echo "build_version=preprod" >> $GITHUB_ENV
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
- name: Set up Depot CLI
Expand Down
22 changes: 20 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ FROM composer:${COMPOSER_VERSION} as composer

FROM php:${PHP_VERSION}-fpm-alpine

ARG PHP_VERSION=8
ENV PHP_VERSION $PHP_VERSION
ARG COMPOSER_VERSION=2
ENV COMPOSER_VERSION $COMPOSER_VERSION

## XDEBUG
RUN curl -sSLf \
-o /usr/local/bin/install-php-extensions \
Expand Down Expand Up @@ -50,12 +55,25 @@ ARG BUILD_DATE
ARG IMAGE_TAG=ghcr.io/devgine/composer-php:latest

LABEL maintainer="yosribahri@gmail.com"
LABEL org.opencontainers.image.title="Composer v$COMPOSER_VERSION PHP-fpm $PHP_VERSION docker image"
LABEL org.opencontainers.image.description="This is a docker image based on official alpine image, PHP-fpm \
$PHP_VERSION and composer v$COMPOSER_VERSION. This image will help you to build and test your PHP projects with \
different PHP version. It contains a necessary tools you need to analyze and test your PHP project \
(xdebug, phpunit, phpstan, php-cs-fixer. phpmd and rector)."
LABEL org.opencontainers.image.source="https://github.com/devgine/composer-php"
LABEL org.opencontainers.image.description="PHP composer golden image"
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.created=$BUILD_DATE
LABEL org.opencontainers.image.url="https://github.com/devgine/composer-php"
LABEL org.opencontainers.image.version=$BUILD_VERSION
LABEL org.opencontainers.image.revision=$VCS_REF
LABEL org.opencontainers.image.vendor="devgine"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="devgine/composer-php"
LABEL org.label-schema.description="PHP composer golden image"
LABEL org.label-schema.description="This is a docker image based on official alpine image, PHP-fpm \
$PHP_VERSION and composer v$COMPOSER_VERSION. This image will help you to build and test your PHP projects with \
different PHP version. It contains a necessary tools you need to analyze and test your PHP project \
(xdebug, phpunit, phpstan, php-cs-fixer. phpmd and rector)."
LABEL org.label-schema.url="https://github.com/devgine/composer-php"
LABEL org.label-schema.vcs-url="https://github.com/devgine/composer-php"
LABEL org.label-schema.vcs-ref=$VCS_REF
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
[![Build](https://github.com/devgine/composer-php/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/devgine/composer-php/actions/workflows/build.yaml)
[![License](https://img.shields.io/github/license/devgine/composer-php)](https://github.com/devgine/composer-php/blob/main/LICENSE)
![GitHub top language](https://img.shields.io/github/languages/top/devgine/composer-php)

[![Packages retention policy](https://github.com/devgine/composer-php/actions/workflows/packages-retention-policy.yaml/badge.svg?branch=main)](https://github.com/devgine/composer-php/actions/workflows/packages-retention-policy.yaml)
## About
This repository is a docker image based on php-alpine to help you to build and test your PHP projects with different PHP version.<br>
This repository is a docker image based on official php, composer and alpine docker images to help you to build and test your PHP projects with different PHP version.<br>
This docker image contains a necessary tools you need to analyze and test your PHP project.<br>
List of docker images available by PHP versions:

Expand All @@ -20,7 +20,7 @@ List of docker images available by PHP versions:
| PHP 7.2 | `ghcr.io/devgine/composer-php:v2-php7.2-alpine` |

## Components
All image tags are based on alpine.
All image tags are based on alpine OS.<br>
Below is the list of tools with their preinstalled version according to the version of PHP.

| Image tag | PHP | Composer | PHP Unit | XDebug | Rector | PHPStan | PHP CS FIXER | PHP MD | PHP CPD |
Expand All @@ -42,6 +42,14 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
### Use as base image in Dockerfile
```dockerfile
FROM ghcr.io/devgine/composer-php:latest

# Add your custom instructions here
# example: install bash
RUN apk add --no-cache bash

# example: expose 8080 port
EXPOSE 8080
#...
```

### Use components
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php7.2-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php7.2-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php7.3-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php7.3-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php7.4-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php7.4-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php8.0-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php8.0-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php8.1-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php8.1-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down
4 changes: 2 additions & 2 deletions doc/v2-php8.2-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ docker run -ti -v LOCAL_PROJETC_DIR:/var/www/composer ghcr.io/devgine/composer-p
```dockerfile
FROM ghcr.io/devgine/composer-php:v2-php8.2-alpine

## SYMFONY CLI INSTALL
# Add your custom instructions here
# example: install symfony cli
RUN apk add --no-cache bash git
RUN curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash
RUN apk add symfony-cli
## END SYMFONY CLI INSTALL
```

## Content
Expand Down

0 comments on commit b272f5e

Please sign in to comment.