File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG PHP_VERSION
2+ ARG BREF_VERSION
3+ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext
4+
5+ RUN MAKEFLAGS="-j $(nproc)" pecl install protobuf > /dev/null
6+ RUN cp `php-config --extension-dir`/protobuf.so /tmp/protobuf.so
7+ RUN strip --strip-debug /tmp/protobuf.so
8+ RUN echo 'extension=protobuf.so' > /tmp/ext.ini
9+
10+ # Build the final image with just the files we need
11+ FROM scratch
12+
13+ # Copy things we installed to the final image
14+ COPY --from=ext /tmp/protobuf.so /opt/bref/extensions/protobuf.so
15+ COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-protobuf.ini
Original file line number Diff line number Diff line change 1+ {
2+ "php" : [
3+ " 81" ,
4+ " 82" ,
5+ " 83" ,
6+ " 84"
7+ ]
8+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ if (!class_exists ($ function = \Google \Protobuf \Any::class)) {
4+ echo sprintf ('FAIL: Class "%s" does not exist. ' , $ function ) . PHP_EOL ;
5+ exit (1 );
6+ }
7+
8+ exit (0 );
You can’t perform that action at this time.
0 commit comments