Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 0 additions & 101 deletions .github/workflows/nightly.yml

This file was deleted.

36 changes: 31 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker RELEASE
name: Docker Build & Release

on:
workflow_dispatch:
Expand All @@ -10,7 +10,8 @@ on:

env:
IMAGE_NAME: pimcore/pimcore
LATEST_TAG: main
LATEST_TAG: 1.0
DEV_BRANCH: 1.x

jobs:
build-php:
Expand All @@ -22,7 +23,7 @@ jobs:
php: [ '8.0', '8.1' ]
distro: [ bullseye ]
target: [ fpm, debug, supervisord ]
tag: [ 'main' ]
tag: [ '1.x', '1.0' ]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -54,7 +55,12 @@ jobs:
DOCKER_PLATFORMS=linux/amd64,linux/arm64
PHP_VERSION=${{ matrix.php }}
DEBIAN_VERSION="${{ matrix.distro }}"
VERSION="${{ matrix.tag }}"
VERSION="v${{ matrix.tag }}"
# for the latest dev branch we use "dev" as the version and not the name of the branch
if [ $DEV_BRANCH = "${{ matrix.tag }}" ]; then
VERSION="dev"
fi

PHP_SUB_VERSION=$(docker run -i --rm php:${{ matrix.php }}-fpm-${{ matrix.distro }} php -r 'echo PHP_VERSION;')

if [ "${{ matrix.target }}" = "fpm" ]; then
Expand All @@ -68,14 +74,34 @@ jobs:
TAG="${BASE_TAG}-${VERSION}"
TAG_DETAILED="${BASE_TAG_DETAILED}-${VERSION}"
TAGS="--tag ${IMAGE_NAME}:${TAG}"

TAGS="$TAGS --tag ${IMAGE_NAME}:${TAG_DETAILED}"

# Tag latest with Version build too
if [ $LATEST_TAG = "${{ matrix.tag }}" ]; then
TAGS="$TAGS --tag ${IMAGE_NAME}:${BASE_TAG}-latest"
fi

# Create tag for major version
if [[ $VERSION =~ ^v[0-9]+.[0-9]+$ ]]; then
VERSION_MAJOR=${VERSION//.[0-9]/}
TAGS="$TAGS --tag ${IMAGE_NAME}:${BASE_TAG}-${VERSION_MAJOR}"
fi

# BC Layer for tags before we introduced versioning
# They use uppercase "PHP" in tag name and always used the latest dev branch
if [ $DEV_BRANCH = "${{ matrix.tag }}" ]; then
if [ "${{ matrix.target }}" = "debug" ]; then
TAGS="$TAGS --tag ${IMAGE_NAME}:PHP${{ matrix.php }}-fpm-debug"
TAGS="$TAGS --tag ${IMAGE_NAME}:PHP${{ matrix.php }}-cli-debug"
elif [ "${{ matrix.target }}" = "fpm" ]; then
TAGS="$TAGS --tag ${IMAGE_NAME}:PHP${{ matrix.php }}-cli"
TAGS="$TAGS --tag ${IMAGE_NAME}:PHP${{ matrix.php }}-fpm"
elif [ "${{ matrix.target }}" = "supervisord" ]; then
TAGS="$TAGS --tag ${IMAGE_NAME}:PHP${{ matrix.php }}-supervisord"
fi
fi


echo ::set-output name=tag::${TAG}

echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
Expand Down
52 changes: 41 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,46 @@ It doesn't include the Pimcore software itself, it just provides an environment
of Pimcore, so that you can leverage the full functionality.

You can either use this image directly by mounting Pimcore into the container, or as a template for your customized

ready-to-deploy images. As a starting point please see [example docker-compose configuration](https://github.com/pimcore/skeleton/blob/HEAD/docker-compose.yaml).

## Supported tags and respective Dockerfile links
- PHP8.0
- fpm (`pimcore/pimcore:php8.0-bullseye-fpm`)
- debug (`pimcore/pimcore:php8.0-bullseye-debug`) - with xdebug enabled
- supervisord (`pimcore/pimcore:php8.0-bullseye-supervisord`)
- PHP8.1
- fpm (`pimcore/pimcore:php8.1-bullseye-fpm`)
- debug (`pimcore/pimcore:php8.1-bullseye-debug`) - with xdebug enabled
- supervisord (`pimcore/pimcore:php8.1-bullseye-supervisord`)

## Image flavors
We're providing 3 different image flavors:
- PHP image for FPM and CLI (e.g. `php8.1-latest`)
- PHP debug image based on PHP image above, including preconfigured Xdebug for FPM and CLI (e.g. `php8.1-debug-latest`)
- Supervisord image based on PHP image above, for cron & queue processing (e.g. `php8.1-supervisord-latest`)

## Versioning
Our images are versioned using a version-suffix staring with `-v` following SemVer.
With that we're able to allow smooth upgrades, breaking changes are only delivered with major versions.
Additionally we're offering 2 special tag suffixes:
- `-latest` always points to the latest available tag (recommended for local development)
- `-dev` always points to the work in progress

We're also offering special tags for specific PHP versions, e.g. `php8.1.11-v1.0`.

## Examples

### PHP images
```text
php8.1-latest # always use the latest PHP 8.1 image
php8.1-v1 # always point to the latest minor version of v1
php8.1-v1.0 # pin to specific image version, always using the latest bugfixes from PHP 8.1
php8.1.11-v1.0 # pin to a specific PHP version & image version
php8.1-dev # development image (build from the default branch)
```

### PHP Debug images
Same as PHP images, but using `-debug` after the PHP version:
```text
php8.1-debug-latest
php8.1-debug-v1
...
```

### Supervisord
Same as PHP images, but using `-supervisor` after the PHP version:
```text
php8.1-supervisor-latest
php8.1-supervisor-v1
...
```