From dee5ae938ae80bd5e68427313c10535995c52b2a Mon Sep 17 00:00:00 2001 From: Ivo Jimenez Date: Tue, 19 Oct 2021 18:57:55 -0700 Subject: [PATCH] readme: update 'build manually' instructions Public build assumes clang-12. Also adds a reference to instructions for using the pre-baked docker image with the frozen toolchain Signed-off-by: Ivo Jimenez --- README.md | 4 ++-- tools/docker/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 tools/docker/README.md diff --git a/README.md b/README.md index aabeef5e56c00..70c23124d57ec 100644 --- a/README.md +++ b/README.md @@ -74,10 +74,10 @@ all built from source. The only thing we do not build yet is the Linux Kernel, b For hackers, here is the short and sweet: ``` -sudo ./install-dependencies.sh && CC=gcc-11 CXX=g++-11 ./build.sh +sudo ./install-dependencies.sh && CC=clang CXX=clang++ ./build.sh ``` -> We build with coros, so you need gcc11+ or clang12+ +For quicker dev setup, we provide a [docker image](tools/docker/README.md) with the toolchain installed. # Beta builds diff --git a/tools/docker/README.md b/tools/docker/README.md new file mode 100644 index 0000000000000..70ff5383f7629 --- /dev/null +++ b/tools/docker/README.md @@ -0,0 +1,25 @@ +# Docker Image with Redpanda Toolchain + +The `Dockerfile` available in this folder defines the contents of the image published to . +To build Redpanda using this image: + +```bash +docker pull vectorized/redpanda-toolchain + +cd redpanda/ +docker run --rm -ti -v $PWD:$PWD:Z -w $PWD vectorized/redpanda-toolchain ./build.sh +``` + +You can add the `--ipc=host` flag to share the host's `/dev/shm` folder, so that the `CCACHE_DIR` folder (`/dev/shm/redpanda` by default) can be available across `docker run` invocations. + +In systems with SELinux enabled, the `:Z` bind-mount option might cause the container to take too long to setup (due to SELinux labels being applied to individual files). +To avoid this, you can add the `--privileged` flag, and that will instruct Docker (or Podman) to skip applying SELinux profiles. + +If you need rebuild the toolchain image locally: + +```bash +docker build \ + -t vectorized/redpanda-toolchain \ + -f tools/docker/Dockerfile \ + . +```