Skip to content

Commit

Permalink
readme: update 'build manually' instructions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ivotron committed Oct 31, 2021
1 parent effe131 commit dee5ae9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 25 additions & 0 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Docker Image with Redpanda Toolchain

The `Dockerfile` available in this folder defines the contents of the image published to <https://hub.docker.com/r/vectorized/redpanda-toolchain>.
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 \
.
```

0 comments on commit dee5ae9

Please sign in to comment.