From b452e33bd1bfc47bbf2696b6e18872bd10b679bb Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 19 Jan 2015 20:02:23 +0200 Subject: [PATCH] README: simplify docker build instructions Run the build command directly in docker, using a shell function, instead of opening a shell. Forward the user/group IDs so the build artifacts belong to the user, not root. --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9cedbc48f4..bc3dfbd481 100644 --- a/README.md +++ b/README.md @@ -82,17 +82,19 @@ To build a Docker image: docker build -t seastar-dev docker/dev ``` -To launch a container: +Create an shell function for building insider the container (bash syntax given): -``` -$ docker run -v $HOME/seastar/:/seastar -i -t seastar-dev /bin/bash +``` +$ seabuild() { docker run -v $HOME/seastar/:/seastar -u $(id -u):$(id -g) -w /seastar -t seastar-dev "$@"; } ``` -Finally, to build seastar inside the container: +(it is recommended to put this inside your .bashrc or similar) + +To build inside a container: ``` -cd /seastar -ninja-build +$ seabuild ./configure.py +$ seabuild ninja-build ``` ### Building with a DPDK network backend