├── .gitignore ├── README.md ├── Dockerfile └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-v8js 2 | =========== 3 | 4 | Dockerfile for [V8Js PHP extension](https://github.com/phpv8/v8js) 5 | 6 | 7 | License 8 | ------- 9 | 10 | Licensed under The MIT License (MIT) 11 | For the full copyright and license information, please view the LICENSE file. 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM stesie/libv8-8.4 AS builder 2 | MAINTAINER Stefan Siegl 3 | 4 | RUN apt-get update 5 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 6 | php-dev git ca-certificates g++ make 7 | 8 | RUN git clone https://github.com/phpv8/v8js.git /usr/local/src/v8js 9 | WORKDIR /usr/local/src/v8js 10 | 11 | RUN phpize 12 | RUN ./configure --with-v8js=/opt/libv8-8.4 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS" 13 | RUN make all -j`nproc` 14 | 15 | FROM stesie/libv8-8.4 16 | COPY --from=builder /usr/local/src/v8js/modules/v8js.so /usr/lib/php/20170718/ 17 | 18 | RUN apt-get update && \ 19 | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends php-cli && \ 20 | echo extension=v8js.so > /etc/php/7.2/cli/conf.d/99-v8js.ini && \ 21 | apt-get autoremove -y && \ 22 | apt-get clean && \ 23 | rm -rf /var/lib/apt/lists/* 24 | 25 | CMD [ "php", "-a" ] 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Stefan Siegl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | --------------------------------------------------------------------------------