Commit Graph

63 Commits

Author SHA1 Message Date
Michael Crosby 603c151e6c Move ambient capabilties behind build tag
This moves the ambient capability support behind an `ambient` build tag
so that it is only compiled upon request.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-02 10:59:59 -07:00
Shukui Yang 4853f3b628 Bug fix for make dbuild
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-26 12:04:50 +08:00
Mrunal Patel f516b5d082 Merge pull request #1022 from hqhq/add_privileged_for_dbuild
Add privileged to make dbuild
2016-09-13 10:07:10 -07:00
Shukui Yang 8b151933ed Fix make release error:
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [release] Error 2
-SHELL ?= $(shell command -v bash 2>/dev/null)
+SHELL := $(shell command -v bash 2>/dev/null)

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-12 18:52:24 +08:00
Aleksa Sarai 37f1747aec
Merge branch 'pr-914'
Closes #914
2016-09-10 17:24:16 +10:00
Mrunal Patel c6b3e79d30 Merge pull request #1017 from WeiZhang555/version-dirty
Append string "-dirty" to version if git repo is unclean
2016-09-07 12:24:19 -07:00
Qiang Huang aeba315e44 Add privileged to make dbuild
So we don't get `mount: permission denied` when make dbuild.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-09-06 14:53:46 +08:00
Zhao Lei 54390f89a7 Introduce make release
So we can make all types of release binary with combination
of following flags:
 seccomp
 selinux
 apparmor
 static

All binary files are put in release/ dir, like:
 [root@zlosvm1 runc]# ls -l release
 total 53556
 -rwxr-xr-x 1 root root 9517965 Aug 24 16:59 runc
 -rwxr-xr-x 1 root root 9673533 Aug 24 17:00 runc.seccomp
 -rwxr-xr-x 1 root root 9705839 Aug 24 17:00 runc.seccomp.selinux
 -rwxr-xr-x 1 root root 9546175 Aug 24 16:59 runc.selinux
 -rwxr-xr-x 1 root root 8205015 Aug 24 16:59 runc.selinux.static
 -rwxr-xr-x 1 root root 8181789 Aug 24 16:59 runc.static
 ...
Closes #899

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-09-06 11:22:34 +08:00
Jiuyue Ma 4bc8637393 Makefile: Fix wrong dependency of "integration" target
Change dependency of integration to runcimage.

Signed-off-by: Jiuyue Ma <majiuyue@huawei.com>
2016-09-06 08:38:32 +08:00
Zhang Wei 9f80653779 Append string "-dirty" to version if git repo is unclean
If runc binary is compiled from codes with modified but not commited
files, git commits should report "COMMIT-dirty" instead of single
"COMMIT" to warn users.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-04 16:08:39 +08:00
Qiang Huang 0c80599812 Combine runctestimage and runcimage
There is no need that keep them separate, it also
fixes #1006.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-30 09:46:47 +08:00
Kenfe-Mickael Laventure 9977d24388 Use git branch name as tag when building images
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-29 07:26:48 -07:00
Michael Crosby c5060ff303 Merge pull request #827 from crosbymichael/create-start
Implement create and start
2016-06-03 10:38:03 -07:00
Michael Crosby efcd73fb5b Fix signal handling for unit tests
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:10:47 -07:00
Qiang Huang 152ee95380 Add VERSION file to contain the version info
We need this because we need to get version info out of
go code, eg. build rpm package.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-30 10:24:22 +08:00
Dan Walsh 8b81b10397 Add bash completion support
I have taken the docker command completions code and reworked it for runc
support.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-05-25 15:18:43 -04:00
Aleksa Sarai dd4a897f5d *: enable full test suite on make test
Enable the full test suite to run on `make test`. They also all run
inside a Docker container for maximum reproducibility.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-03 17:15:49 +10:00
Qiang Huang 18612e6c7f Remove sniffTest
We have integration test now, not ideal though, but it
surely can replace sniffTest.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-26 16:20:45 +08:00
Mrunal Patel 94acd98156 Merge pull request #766 from hqhq/hq_makefile_man
Add target man in Makefile
2016-04-22 15:51:46 -07:00
Qiang Huang 3dadcf02f6 Add target man in Makefile
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-22 14:37:42 +08:00
Mike Brown e9f89e163f adds integration tests
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2016-04-21 19:09:27 -05:00
Ido Yariv 80cf52436a Speed up successive builds
By saving the packages that are dependencies of runc, successive build
times can be decreased by over 50%.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Ido Yariv 77ce689fe0 Don't use pre-defined GOPATH
All packages should be vendored, so there's no need to include the
pre-defined GOPATH in the search path.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Ido Yariv 8f250ceb47 Fix static builds
The runc symlink is only created when building non-static builds, so it
might be missing when building static builds. Fix this.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Mrunal Patel e874369984 Merge pull request #702 from cyphar/install-to-sbin
Makefile: install to /usr/local/sbin
2016-04-12 12:12:08 -07:00
Mrunal Patel f3c6d9e7cc Fix the build by removing go get for vet
golang.org/x/tools/cmd/vet has been removed as it is available in go cmd directly

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-07 09:36:08 -07:00
Aleksa Sarai 534d7a8ee4 Makefile: install to /usr/local/sbin
Since runC requires root in order to run, it makes more sense to put it
in /usr/local/sbin (which is traditionally for root-only utilities).
This also fixes the section number mismatch (man8 is usually for
administrative utilities in /usr/local/sbin).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-03-31 01:15:05 +11:00
Qiang Huang a719ea5c61 Don't link runc every time
So we won't see the link message every time we make
runc. Also it use force remove when make clean, so
we don't see annoying error when do extra make clean.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-17 08:24:24 +08:00
Qiang Huang 7a4285484d Add make uninstall command
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-14 09:59:36 +08:00
Michael Crosby beb3e5e71a Add gitcommit to runc builds
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-11 15:20:00 -08:00
Doug Davis 595f593c24 Add the most basic sniff tests of runc
just so that we're not merging code into master w/o any tests at all.
I expect this to be removed once we have a real testing infrastructure.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-03-07 11:01:31 -08:00
Alexander Morozov 4a12ff6e58 Merge pull request #443 from BenHall/build
Build runC binary via a Docker container
2016-02-26 20:17:31 -08:00
Mrunal Patel 930dbb38a2 Merge pull request #328 from hqhq/hq_build_runc_everywhere
Make runc buildable everywhere
2016-02-25 23:22:00 -08:00
Ben Hall ec9d8769f0 Add a Dockerfile and a dbuild target. This allows you to build runC via Docker without having Golang installed on the host
Signed-off-by: Ben Hall <ben@benhall.me.uk>
2015-12-18 11:37:12 +00:00
Jessica Frazelle ecd6463101
static binary \o/
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-14 16:33:52 -08:00
Qiang Huang ed7edf771f Make runc buildable everywhere
Currently we need to clone github.com/opencontainers/runc to
GOPATH so we can make it, it's not friendly for developers.

We can resolve it by vendoring itself as a symlink in GOPATH.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-10-12 19:17:58 +08:00
Michael Crosby a8e0185d97 Add seccomp build tag
Add a seccomp build tag and also support in the Makefile to add or
remove build tags.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-09-11 12:03:57 -07:00
Marcos Lilljedahl 5bc1360d89 Add TESTFLAGS to Makefile targets
This commit allows to send `go test` arguments to current makefile
`test` and `localtest` targets.

A usage example would be `make test TESTFLAGS="-run=SomeTestFunction"`
to easily run a single test function.

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2015-07-28 19:55:44 -03:00
Alexander Morozov adc6564042 Move test_Dockerfile to script dir
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00
Alexander Morozov 48ddedba65 Add ci target
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00
Mrunal Patel 53bab7d85f Prefer Godep dependencies in the GOPATH
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-06-30 14:07:56 -04:00
Alexander Morozov a87bc12f86 Add makefile targets for basic lint and testing
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-30 10:17:10 -07:00
Michael Crosby 75ab73b8ab Remove all for make install
This is not how Makefiles work and install should not build everything
again.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-29 13:33:15 -07:00
Michael Timbrook f8c4890a2f Added all dependency to install in Makefile 2015-06-25 13:42:15 -07:00
Michael Crosby f20d95b6f2 Use godeps for building of vendored files
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-22 09:23:17 -07:00
Michael Crosby 9fac183294 Initial commit of runc binary
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-21 19:34:13 -07:00
Michael Crosby 8f97d39dd2 Move libcontainer into subdirectory
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-21 19:29:15 -07:00
Daniel, Dao Quang Minh c4a8de8de0 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 <dqminh89@gmail.com>
2015-03-28 08:14:22 +00:00
Jessica Frazelle f8eb40433c Add a validate script so we can validate.
For easy validations.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)
2015-02-23 12:53:49 -08:00
Michael Crosby f4cf808a3d Merge branch 'master' into api
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	MAINTAINERS
	cgroups/cgroups.go
	cgroups/fs/apply_raw.go
	cgroups/fs/notify_linux.go
	cgroups/fs/notify_linux_test.go
	cgroups/systemd/apply_systemd.go
	config.go
	configs/config_test.go
	console/console.go
	integration/exec_test.go
	integration/init_test.go
	integration/template_test.go
	integration/utils_test.go
	linux_notify.go
	linux_notify_test.go
	mount/init.go
	mount/mount_config.go
	mount/pivotroot.go
	mount/ptmx.go
	namespaces/create.go
	namespaces/exec.go
	namespaces/execin.go
	namespaces/init.go
	namespaces/nsenter/nsenter.c
	namespaces/nsenter/nsenter.go
	namespaces/utils.go
	network/network.go
	network/types.go
	network/veth.go
	notify_linux.go
	notify_linux_test.go
	nsinit/exec.go
	nsinit/main.go
	nsinit/nsenter.go
	nsinit/oom.go
	sample_configs/host-pid.json
	sample_configs/userns.json
	security/capabilities/capabilities.go
	update-vendor.sh
2015-02-16 15:09:42 -08:00