Skip to content

Commit

Permalink
use phalcon-pecl.tgz (#5)
Browse files Browse the repository at this point in the history
* use phalcon-pecl.tgz

* add build limit

* rename workflow

* refine build order

* add ci badge
  • Loading branch information
fizzka committed Oct 4, 2023
1 parent 00dd674 commit 359ccf3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docker-phalcon builder
name: ci

on:
pull_request:
Expand All @@ -14,13 +14,14 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 8
fail-fast: true
matrix:
php:
- 7.4
- "8.0"
- 8.1
- 8.2
- 8.1
- "8.0"
- 7.4
variant:
- "" # cli
- -fpm
Expand Down
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ RUN set -xe && \
docker-php-source extract && \
# Install ext-phalcon
cd /tmp && \
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf v${PHALCON_VERSION}.tar.gz && \
curl -LO https://github.com/phalcon/cphalcon/releases/download/v${PHALCON_VERSION}/phalcon-pecl.tgz && \
tar xzf phalcon-pecl.tgz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
/tmp/cphalcon-${PHALCON_VERSION}/build/phalcon \
/tmp/phalcon-${PHALCON_VERSION} \
&& \
# Remove all temp files
rm -r \
/tmp/v${PHALCON_VERSION}.tar.gz \
/tmp/cphalcon-${PHALCON_VERSION} \
&& \
rm -r /tmp/phalcon-* && \
docker-php-source delete && \
php -m

Expand Down
11 changes: 4 additions & 7 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ RUN set -xe && \
docker-php-source extract && \
# Install ext-phalcon
cd /tmp && \
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf /tmp/v${PHALCON_VERSION}.tar.gz && \
curl -LO https://github.com/phalcon/cphalcon/releases/download/v${PHALCON_VERSION}/phalcon-pecl.tgz && \
tar xzf phalcon-pecl.tgz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
/tmp/cphalcon-${PHALCON_VERSION}/build/phalcon \
/tmp/phalcon-${PHALCON_VERSION} \
&& \
# Remove all temp files
rm -r \
/tmp/v${PHALCON_VERSION}.tar.gz \
/tmp/cphalcon-${PHALCON_VERSION} \
&& \
rm -r /tmp/phalcon-* && \
docker-php-source delete && \
apk del .build-deps && \
php -m
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
![Phalcon devtools](https://img.shields.io/badge/phalcon--devtools-4.2.0-blue.svg)
[![](https://img.shields.io/docker/stars/mileschou/phalcon.svg)](https://hub.docker.com/r/mileschou/phalcon/)
[![](https://img.shields.io/docker/pulls/mileschou/phalcon.svg)](https://hub.docker.com/r/mileschou/phalcon/)
[![ci](https://github.com/fizzka/docker-phalcon/actions/workflows/build.yml/badge.svg)](https://github.com/fizzka/docker-phalcon/actions/workflows/build.yml)

Docker Phalcon base image, see [DockerHub](https://hub.docker.com/r/mileschou/phalcon/).

Expand Down

0 comments on commit 359ccf3

Please sign in to comment.