Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build and push for fedora #462

Merged
merged 2 commits into from
Aug 8, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
tag: "8.2"
image_name: "php-82"

- dockerfile: "8.3/Dockerfile.fedora"
docker_context: "8.3"
registry_namespace: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
tag: "8.3"
image_name: "php-83"

steps:
- name: Build and push to quay.io registry
uses: sclorg/build-and-push-action@v4
Expand Down
25 changes: 13 additions & 12 deletions 8.3/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PHP 8.2 container image
PHP 8.3 container image
=======================

This container image includes PHP 8.2 as a [S2I](https://github.com/openshift/source-to-image) base image for your PHP 8.2 applications.
This container image includes PHP 8.3 as a [S2I](https://github.com/openshift/source-to-image) base image for your PHP 8.3 applications.
Users can choose between RHEL and CentOS Stream based builder images.
The RHEL UBI images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/),
the CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg),
Expand All @@ -13,8 +13,8 @@ Note: while the examples in this README are calling `podman`, you can replace an
Description
-----------

PHP 8.2 available as container is a base platform for
building and running various PHP 8.2 applications and frameworks.
PHP 8.3 available as container is a base platform for
building and running various PHP 8.3 applications and frameworks.
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers
to write dynamically generated web pages. PHP also offers built-in database integration
for several commercial and non-commercial database management systems, so writing
Expand All @@ -28,12 +28,12 @@ the nodejs itself is included just to make the npm work.

Usage in OpenShift
------------------
In this example, we will assume that you are using the `ubi8/php-82` image, available via `php:8.2` imagestream tag in Openshift.
In this example, we will assume that you are using the `ubi8/php-83` image, available via `php:8.3` imagestream tag in Openshift.

To build a simple [cakephp-sample-app](https://github.com/sclorg/cakephp-ex.git) application in Openshift:

```
oc new-app php:8.2~https://github.com/sclorg/cakephp-ex.git
oc new-app php:8.3~https://github.com/sclorg/cakephp-ex.git
```

To access the application:
Expand Down Expand Up @@ -72,10 +72,10 @@ To use the PHP image in a Dockerfile, follow these steps:
#### 1. Pull a base builder image to build on

```
podman pull ubi8/php-82
podman pull ubi8/php-83
```

An UBI image `ubi8/php-82` is used in this example. This image is usable and freely redistributable under the terms of the UBI End User License Agreement (EULA). See more about UBI at [UBI FAQ](https://developers.redhat.com/articles/ubi-faq).
An UBI image `ubi8/php-83` is used in this example. This image is usable and freely redistributable under the terms of the UBI End User License Agreement (EULA). See more about UBI at [UBI FAQ](https://developers.redhat.com/articles/ubi-faq).

#### 2. Pull an application code

Expand All @@ -97,7 +97,7 @@ For all these three parts, users can either setup all manually and use commands

##### 3.1. To use your own setup, create a Dockerfile with this content:
```
FROM ubi8/php-82
FROM ubi8/php-83

# Add application sources
ADD app-src .
Expand All @@ -123,7 +123,7 @@ CMD /usr/libexec/s2i/run

##### 3.2. To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content:
```
FROM ubi8/php-82
FROM ubi8/php-83

# Add application sources to a directory that the assemble script expects them
# and set permissions so that the container runs without root access
Expand Down Expand Up @@ -175,7 +175,7 @@ The following environment variables set their equivalent property value in the p
* Default: ON
* **INCLUDE_PATH**
* Path for PHP source files
* Default: .:/opt/app-root/src:/opt/rh/rh-php82/root/usr/share/pear (EL7)
* Default: .:/opt/app-root/src:/opt/rh/rh-php83/root/usr/share/pear (EL7)
* Default: .:/opt/app-root/src:/usr/share/pear (EL8, Fedora)
* **PHP_MEMORY_LIMIT**
* Memory Limit
Expand Down Expand Up @@ -322,7 +322,8 @@ See also
--------
Dockerfile and other sources are available on https://github.com/sclorg/s2i-php-container.
In that repository you also can find another versions of Python environment Dockerfiles.
Dockerfile for RHEL8 is called `Dockerfile.rhel8`, Dockerfile for RHEL9 is called `Dockerfile.rhel9` and the Fedora Dockerfile is called Dockerfile.fedora.
Dockerfile for RHEL8 is called `Dockerfile.rhel8`, Dockerfile for RHEL9 is called `Dockerfile.rhel9`,
Dockerfile for CentOS Stream 10 is called `Dockerfile.c10s`,and the Fedora Dockerfile is called Dockerfile.fedora.

Security Implications
---------------------
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Images available on Quay are:
* Fedora [php-80](https://quay.io/repository/fedora/php-80)
* Fedora [php-81](https://quay.io/repository/fedora/php-81)
* Fedora [php-82](https://quay.io/repository/fedora/php-82)
* Fedora [php-83](https://quay.io/repository/fedora/php-83)

This repository contains the source for building various versions of
the PHP application as a reproducible Docker image using
Expand All @@ -32,13 +33,15 @@ PHP versions currently supported are:
* [php-8.0](8.0)
* [php-8.1](8.1)
* [php-8.2](8.2)
* [php-8.3](8.3)

RHEL versions currently supported are:
* RHEL8
* RHEL9

CenOS Stream versions currently supported are:
* CentOS Stream 9
* CentOS Stream 10

Installation
------------
Expand Down Expand Up @@ -95,6 +98,9 @@ see [usage documentation](8.1/README.md).
For information about usage of Dockerfile for PHP 8.2,
see [usage documentation](8.2/README.md).

For information about usage of Dockerfile for PHP 8.3,
see [usage documentation](8.3/README.md).

Test
----
This repository also provides a [S2I](https://github.com/openshift/source-to-image) test framework,
Expand Down