summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
authorkleines Filmröllchen <malu.bertsch@gmail.com>2021-06-29 15:14:25 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-29 15:56:02 +0200
commit7ff363127b8a94660327d306094b1d8f437ffb2e (patch)
tree90741d2cd5147928a0d5a006b9820f64faa52edf /Toolchain
parent3ecd1d603fba012d38ed8a094bc27eee94613827 (diff)
downloadserenity-7ff363127b8a94660327d306094b1d8f437ffb2e.zip
Toolchain: Allow containerized work with Serenity via Docker
Docker is a nice way of doing build automation, or just containerizing builds for increased safety and isolating unstable packages. The old Dockerfile in the toolchain did not satisfy these needs. The new Dockerfile is known to run successfully on Docker version 20.10.7. It clones the SerenityOS repo and builds the toolchain. In this way, it is intended to be a starting point for other Docker images that can e.g. run builds. For example, one can simply run this docker image as-is, exec a shell in it and run a build there.
Diffstat (limited to 'Toolchain')
-rw-r--r--Toolchain/Dockerfile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Toolchain/Dockerfile b/Toolchain/Dockerfile
index d6bdc31840..e7a794bc41 100644
--- a/Toolchain/Dockerfile
+++ b/Toolchain/Dockerfile
@@ -23,7 +23,12 @@ RUN apt-get update -y \
tzdata \
unzip \
wget
+RUN apt install gcc-10 g++-10; \
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 900 --slave /usr/bin/g++ g++ /usr/bin/g++-10
-WORKDIR /serenity
+RUN git clone --depth 1 https://github.com/SerenityOS/serenity.git /serenity/serenity-git
+RUN cd /serenity/serenity-git/Toolchain; \
+ ./BuildIt.sh
-RUN /bin/bash
+WORKDIR /serenity
+VOLUME /serenity/out