From c4a8de8de07eace38530c01c3a8bcbd7979c6a0a Mon Sep 17 00:00:00 2001 From: "Daniel, Dao Quang Minh" Date: Sat, 28 Mar 2015 07:32:03 +0000 Subject: [PATCH] add binary target to direct install in a container This add `make binary` to perform direct install libcontainer binaries inside dockercore/libcontainer container instead of having to install dependencies and run `make direct-install` on the host. The `nsinit` binary will be placed into `bundles/nsinit`, and we ignore the bundles directory from git. Signed-off-by: Daniel, Dao Quang Minh --- .gitignore | 1 + Makefile | 2 ++ README.md | 3 +++ 3 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 4c2914fc..bf6a664d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +bundles nsinit/nsinit diff --git a/Makefile b/Makefile index c2c9a98d..1a2e23e0 100644 --- a/Makefile +++ b/Makefile @@ -29,3 +29,5 @@ local: validate: hack/validate.sh +binary: all + docker run --rm --privileged -v $(CURDIR)/bundles:/go/bin dockercore/libcontainer make direct-install diff --git a/README.md b/README.md index 984f2c52..6257f9c7 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,9 @@ container.Resume() It is able to spawn new containers or join existing containers. A root filesystem must be provided for use along with a container configuration file. +To build `nsinit`, run `make binary`. It will save the binary into +`bundles/nsinit`. + To use `nsinit`, cd into a Linux rootfs and copy a `container.json` file into the directory with your specified configuration. Environment, networking, and different capabilities for the container are specified in this file.