Skip to content

Commit

Permalink
excimer support (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
chekalsky authored Sep 16, 2023
1 parent 503c35c commit 81de8bb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ functions:
| Decimal | `${bref-extra:decimal-php-81}` |
| DS | `${bref-extra:ds-php-81}` |
| Elastic APM | `${bref-extra:elastic-apm-php-81}` |
| Excimer | `${bref-extra:excimer-php-81}` |
| GD | `${bref-extra:gd-php-81}` |
| gnupg | `${bref-extra:gnupg-php-81}` |
| GMP | `${bref-extra:gmp-php-81}` |
Expand Down
14 changes: 14 additions & 0 deletions layers/excimer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

RUN pecl install excimer
RUN cp `php-config --extension-dir`/excimer.so /tmp/excimer.so
RUN echo 'extension=excimer.so' > /tmp/ext.ini

# Build the final image with just the files we need
FROM scratch

# Copy things we installed to the final image
COPY --from=ext /tmp/excimer.so /opt/bref/extensions/excimer.so
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-excimer.ini
7 changes: 7 additions & 0 deletions layers/excimer/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"php": [
"80",
"81",
"82"
]
}
8 changes: 8 additions & 0 deletions layers/excimer/test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

if (!class_exists($class = 'ExcimerProfiler')) {
echo sprintf('FAIL: Class "%s" does not exist.', $class).PHP_EOL;
exit(1);
}

exit(0);

0 comments on commit 81de8bb

Please sign in to comment.