From 00c0650f963308c05b7b3469e7b0a51e8cc5a28d Mon Sep 17 00:00:00 2001 From: Yonatan Goldschmidt Date: Thu, 21 May 2020 23:04:07 +0300 Subject: [PATCH] Build: Add Dockerfile --- Documentation/BuildInstructions.md | 5 ----- Meta/build-image-qemu.sh | 5 ++++- Toolchain/.dockerignore | 1 + Toolchain/Dockerfile | 12 ++++++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 Toolchain/.dockerignore create mode 100644 Toolchain/Dockerfile diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index bdd30f5ba07..63e6a49dc47 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -10,11 +10,6 @@ Make sure you have all the dependencies installed: sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-system-i386 qemu-utils ``` -On Docker, install these as well: -```bash -sudo apt install wget genext2fs -``` - **Fedora** ```bash sudo dnf install curl cmake mpfr-devel libmpc-devel gmp-devel e2fsprogs @"C Development Tools and Libraries" @Virtualization diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index 10ff5384f95..b26fb1838e7 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -62,8 +62,11 @@ cleanup() { if [ $use_genext2fs = 0 ] ; then printf "unmounting filesystem... " umount mnt || ( sleep 1 && sync && umount mnt ) + rmdir mnt + else + rm -rf mnt fi - rmdir mnt + if [ "$(uname -s)" = "OpenBSD" ]; then vnconfig -u "$VND" elif [ "$(uname -s)" = "FreeBSD" ]; then diff --git a/Toolchain/.dockerignore b/Toolchain/.dockerignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/Toolchain/.dockerignore @@ -0,0 +1 @@ +* diff --git a/Toolchain/Dockerfile b/Toolchain/Dockerfile new file mode 100644 index 00000000000..d5bb1296a6a --- /dev/null +++ b/Toolchain/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:20.04 + +RUN DEBIAN_FRONTEND="noninteractive" apt-get update -y && apt-get install -y tzdata + +RUN apt-get install -y build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-utils wget genext2fs sudo + +RUN mkdir /serenity + +WORKDIR /serenity + +RUN /bin/bash +