Skip to content

Commit

Permalink
#2407 - Add docker files for PHP8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Aug 28, 2023
1 parent 6773f19 commit 82e7ded
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ services:
- "USER=Zephir"
volumes:
- .:/srv

zephir-8.3:
container_name: phalcon-zephir-8.3
hostname: zephir-83
build: docker/8.3
working_dir: /srv
environment:
- "USER=Zephir"
volumes:
- .:/srv
5 changes: 5 additions & 0 deletions docker/8.3/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

alias test-ext='php -d extension=ext/modules/stub.so vendor/bin/phpunit --bootstrap tests/ext-bootstrap.php --testsuite Extension'
alias test-zephir='php vendor/bin/phpunit --colors=always --testsuite Zephir'
alias test-all='test-ext; test-zephir'
25 changes: 25 additions & 0 deletions docker/8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM composer:latest as composer
FROM php:8.3.0beta3-fpm

RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
ENV MAKEFLAGS="-j${CPU_CORES}"

RUN apt update -y && apt install -y \
wget \
zip \
git \
apt-utils \
sudo \
libicu-dev \
libgmp-dev \
libzip-dev && \
pecl install psr zephir_parser

RUN docker-php-ext-install zip gmp intl mysqli && \
docker-php-ext-enable psr zephir_parser

COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Bash script with helper aliases
COPY ./.bashrc /root/.bashrc

CMD ["php-fpm"]

0 comments on commit 82e7ded

Please sign in to comment.