-
-
Save secretsquirrel/6ffd99370c8e4c1f1e973de2a6b5edca to your computer and use it in GitHub Desktop.
Build v8 x64 on modern Linux
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
# Build v8 x64 on modern Linux | |
# Time to run: about 1.2hrs at 8Gb RAM / 8 cores, Ubuntu 22.04 LTS | |
# This dockerfile is part of Zero Day Engineering training materials on JavaScript engines internals and vulnerability research | |
# https://zerodayengineering.com | |
# @zerodaytraining | |
FROM ubuntu:bionic | |
MAINTAINER [email protected] | |
RUN apt-get update && apt-get upgrade | |
RUN apt-get install -y sudo apt-utils --no-install-recommends | |
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo | |
RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
user docker | |
RUN sudo apt-get install -y file curl python python3 xz-utils git ca-certificates lsb-release --no-install-recommends | |
RUN mkdir ~/code | |
WORKDIR /home/docker/code | |
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
ENV PATH $PATH:/home/docker/code/depot_tools | |
RUN gclient | |
RUN fetch v8 | |
WORKDIR v8 | |
# git checkout ... // to build a specific version of v8 | |
RUN gclient sync | |
RUN ./build/install-build-deps.sh | |
RUN tools/dev/gm.py x64.debug x64.release | |
# VOLUME /home/docker/code | |
# To export v8 code directory from container to host, do: | |
# docker run -it -v v8code:/home/docker/code/v8 v8build | |
# docker volume inspect v8code | |
# ln -s <path_to_v8code_docker_volume> ~/v8code | |
# Note that the volume will take extra 11G on host, and persist beyong docker image purge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment