From bdaab5de7a6ca92d0fbfc1ef5991235303f4b302 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 11 Feb 2022 12:09:25 +0530 Subject: [PATCH] Added Dockerfile --- Dockerfile | 11 +++++++++++ README.md | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..868f870 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:18.04 + +# Fetch all essential packages for building the kernel +RUN apt-get update +RUN apt-get install -y git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig wget python3 git make clang gcc bc +RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /bin/repo +RUN chmod +x /bin/repo + +# Get env ready for fetching source code of kernel +RUN git config --global user.email "you@example.com" && \ + git config --global user.name "Your Name" \ No newline at end of file diff --git a/README.md b/README.md index ff48b7a..3e7bf00 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,15 @@ https://cloudfuzz.github.io/android-kernel-exploitation/ +## Docker for building kernel +```bash +# Build the docker image +docker build -t and-build-env . +# Run the docker +docker run -d --rm -it and-build-env +# Get shell in docker image to do further work +``` + ## Author **Ashfaq Ansari ([@HackSysTeam](https://twitter.com/HackSysTeam))** of **[CloudFuzz](https://cloudfuzz.io)**.