Skip to content

Commit c4a8de8

Browse files
committed
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 <[email protected]>
1 parent af371ea commit c4a8de8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
bundles
12
nsinit/nsinit

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ local:
2929
validate:
3030
hack/validate.sh
3131

32+
binary: all
33+
docker run --rm --privileged -v $(CURDIR)/bundles:/go/bin dockercore/libcontainer make direct-install

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ container.Resume()
141141
It is able to spawn new containers or join existing containers. A root
142142
filesystem must be provided for use along with a container configuration file.
143143

144+
To build `nsinit`, run `make binary`. It will save the binary into
145+
`bundles/nsinit`.
146+
144147
To use `nsinit`, cd into a Linux rootfs and copy a `container.json` file into
145148
the directory with your specified configuration. Environment, networking,
146149
and different capabilities for the container are specified in this file.

0 commit comments

Comments
 (0)