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.
This commit is contained in:
Avi Kivity
2015-01-19 20:02:23 +02:00
parent 1a29177d78
commit b452e33bd1

View File

@@ -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