Skip to content

Instantly share code, notes, and snippets.

@spyl94
Created April 19, 2016 12:33
Show Gist options
  • Save spyl94/3304c1a8a43b23f6f6a562fcf4117313 to your computer and use it in GitHub Desktop.
Save spyl94/3304c1a8a43b23f6f6a562fcf4117313 to your computer and use it in GitHub Desktop.
# Install recent v8, phpv8js
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim git git-svn subversion make g++ libreadline-dev && \
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/local/depot_tools && \
export PATH=/usr/local/depot_tools:$PATH && \
cd /tmp && \
rm -rf /tmp/* && \
fetch --nohooks --no-history v8 && \
cd v8 && \
gclient sync --nohooks && \
export GYP_DEFINES="use_system_icu=1" && \
export GYPFLAGS="-Dv8_use_external_startup_data=0 -Dclang=0" && \
make native library=shared snapshot=on -j4 && \
cp out/native/lib.target/lib*.so /usr/lib/ && \
cp out/native/obj.target/tools/gyp/libv8_libplatform.a /usr/lib && \
cp -R include/* /usr/include && \
git clone https://github.com/phpv8/v8js.git --branch 1.1.0 /tmp/v8js && \
cd /tmp/v8js && phpize && ./configure && \
make all test install && \
cd / && \
rm -rf /tmp/* /usr/local/depot_tools && \
apt-get purge -y vim git git-svn subversion make g++ libreadline-dev && \
apt-get autoremove -y && \
apt-get clean all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment