Skip to content

Commit

Permalink
feat: use ubuntu lts (jammy 22.04)
Browse files Browse the repository at this point in the history
  • Loading branch information
qkdreyer committed Dec 28, 2022
1 parent bb381c3 commit 83d25c3
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 751 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Docker PHP Images GitHub workflow
on:
pull_request:
branches:
- 'v4'
- 'v5'
push:
branches:
- 'v4'
- 'v5'
schedule:
- cron: '42 3 * * 0'

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
run: |
TAG_PREFIX="rc${GITHUB_RUN_ID}-" \
PHP_VERSION="${{ matrix.php_version }}" \
BRANCH="v4" \
BRANCH="v5" \
VARIANT="${{ matrix.variant }}" \
PLATFORM="linux/${{ matrix.builder.arch }}" \
./tests-suite/bash_unit -f tap ./tests-suite/*.sh
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
--load \
php${PHP_VERSION//.}-slim-${{ matrix.variant }}
# Retrieve minor
PHP_PATCH_MINOR=`docker run --rm thecodingmachine/php:rc${GITHUB_RUN_ID}-${{ matrix.php_version }}-v4-slim-${{ matrix.variant }} php -v | head -n1 | grep -P '\d+\.\d+\.\d+' -o | head -n1`
PHP_PATCH_MINOR=`docker run --rm thecodingmachine/php:rc${GITHUB_RUN_ID}-${{ matrix.php_version }}-v5-slim-${{ matrix.variant }} php -v | head -n1 | grep -P '\d+\.\d+\.\d+' -o | head -n1`
echo "PHP_PATCH_MINOR=${PHP_PATCH_MINOR}" >> $GITHUB_ENV
- name: Display tags to build
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.slim.apache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#syntax=docker/dockerfile-upstream:1
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL authors="Julien Neuhart <[email protected]>, David Négrier <[email protected]>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -33,7 +33,7 @@ ENV PHP_VERSION=${PHP_VERSION}
# Install php an other packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends gnupg \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-get update \
&& apt-get upgrade -y \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.slim.cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#syntax=docker/dockerfile-upstream:1
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL authors="Julien Neuhart <[email protected]>, David Négrier <[email protected]>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -33,7 +33,7 @@ ENV PHP_VERSION=${PHP_VERSION}
# Install php an other packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends gnupg \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-get update \
&& apt-get upgrade -y \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.slim.fpm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#syntax=docker/dockerfile-upstream:1
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL authors="Julien Neuhart <[email protected]>, David Négrier <[email protected]>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -33,7 +33,7 @@ ENV PHP_VERSION=${PHP_VERSION}
# Install php an other packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends gnupg \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-get update \
&& apt-get upgrade -y \
Expand Down
2 changes: 1 addition & 1 deletion HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Build the slim image
* Run it with docker and try extensions with follow commands
```bash
docker run -it --rm thecodingmachine/php:8.1-v4-slim-apache sudo bash
docker run -it --rm thecodingmachine/php:8.1-v5-slim-apache sudo bash
apt-get update
apt-cache search --names-only php8.1-zip
```
Expand Down
6 changes: 6 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Migrating from v4 to v5 images

Important changes:

- v4 images are based on **Ubuntu 20.04**. v5 images are based on **Ubuntu 22.04**.

# Migrating from v3 to v4 images

Important changes:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ blueprint: ## Generate all blueprints file
test-latest: test-8.1 ## Test the latest build only

_test-prerequisites: blueprint
docker pull ubuntu:20.04
docker pull ubuntu:22.04

test-quick: ## Test 8.0 and 8.1 quickly
VERSION=8.0 VARIANT=cli $(MAKE) _test-version-quick
Expand All @@ -27,14 +27,14 @@ _test-version: _test-prerequisites ## Test php build for VERSION="" and VARIANT=
docker buildx bake --load \
--set "*.platform=$$(uname -p)" \
php$${VERSION//.}-$(VARIANT)-all
PHP_VERSION="$(VERSION)" BRANCH=v4 VARIANT=$(VARIANT) ./tests-suite/bash_unit -f tap ./tests-suite/*.sh || (notify-send -u critical "Tests failed ($(VERSION)-$(VARIANT))" && exit 1)
PHP_VERSION="$(VERSION)" BRANCH=v5 VARIANT=$(VARIANT) ./tests-suite/bash_unit -f tap ./tests-suite/*.sh || (notify-send -u critical "Tests failed ($(VERSION)-$(VARIANT))" && exit 1)
notify-send -u critical "Tests passed with success ($(VERSION)-$(VARIANT))"

_test-version-quick: _test-prerequisites ## Test php build for VERSION="" and VARIANT="" (without node variants)
docker buildx bake --load \
--set "*.platform=$$(uname -p)" \
php$${VERSION//.}-slim-$(VARIANT) php$${VERSION//.}-$(VARIANT)
PHP_VERSION="$(VERSION)" BRANCH=v4 VARIANT=$(VARIANT) ./tests-suite/bash_unit -f tap ./tests-suite/*.sh || (notify-send -u critical "Tests failed ($(VERSION)-$(VARIANT))" && exit 1)
PHP_VERSION="$(VERSION)" BRANCH=v5 VARIANT=$(VARIANT) ./tests-suite/bash_unit -f tap ./tests-suite/*.sh || (notify-send -u critical "Tests failed ($(VERSION)-$(VARIANT))" && exit 1)
notify-send -u critical "Tests passed with success ($(VERSION)-$(VARIANT)) - without node-*"

clean: ## Clean dangles image after build
Expand Down
Loading

0 comments on commit 83d25c3

Please sign in to comment.