Last active
September 30, 2024 13:37
-
-
Save dinamic/60a573e6ffa8749f94931a4d7cfcfcb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.3-bookworm | |
RUN apt update -q && apt upgrade -y \ | |
&& apt-get install -y build-essential git libnode-dev | |
RUN cp -s /usr/lib/`uname -m`-linux-gnu/libv8* /usr/local/lib/ \ | |
&& cp -rs /usr/include/node/* /usr/local/include/ | |
# TODO: Use PECL | |
WORKDIR /tmp | |
RUN git clone https://github.com/phpv8/v8js.git --branch php8 | |
WORKDIR /tmp/v8js | |
RUN phpize && ./configure && make && make test \ | |
&& cp -v modules/v8js.* `php -r "echo ini_get('extension_dir');"` \ | |
&& docker-php-ext-enable v8js \ | |
&& rm -rf /tmp/v8js \ | |
&& php --ri v8js | |
WORKDIR /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks, it works for me!