Closed wsdo closed 6 years ago
Me too.
In order to make this work, you'll have to compile a newer version of v8 than Debian packages. See the v8js
image for an example: https://hub.docker.com/r/stesie/v8js/~/dockerfile/
...
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /tmp/depot_tools && \
export PATH="$PATH:/tmp/depot_tools" && \
\
cd /usr/local/src && fetch v8 && cd v8 && \
git checkout 5.4.500.40 && gclient sync && \
export GYPFLAGS="-Dv8_use_external_startup_data=0" && \
export GYPFLAGS="${GYPFLAGS} -Dlinux_use_bundled_gold=0" && \
make native library=shared snapshot=on -j4 && \
\
mkdir -p /usr/local/lib && \
cp /usr/local/src/v8/out/native/lib.target/lib*.so /usr/local/lib && \
echo "create /usr/local/lib/libv8_libplatform.a\naddlib out/native/obj.target/src/libv8_libplatform.a\nsave\nend" | ar -M && \
cp -R /usr/local/src/v8/include /usr/local && \
chrpath -r '$ORIGIN' /usr/local/lib/libv8.so && \
...
Then you'll likely want to use pecl
to install v8js
.
@tianon thanks!
@wshudong it's not related to docker php by itself, more related to how configure & compile v8js ext on any system, you should close this issue I guess.