1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make
Michael Crosby ee3ac3aa66 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-19 17:33:50 -07:00
..
.build-deb Uncomment the TasksMax val later in the deb build 2016-07-12 16:30:31 -05:00
.build-rpm Remove docker.socket from rpm based systems 2016-07-19 09:31:43 -07:00
.resources-windows Windows: Support running dockerd as a service 2016-04-26 14:04:47 -07:00
.binary Do not default to external linking on arm, i386 2016-07-20 11:21:26 +01:00
.binary-setup Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
.detect-daemon-osarch
.ensure-emptyfs
.go-autogen Windows: Support running dockerd as a service 2016-04-26 14:04:47 -07:00
.integration-daemon-setup Move some test fixtures to go 2016-09-07 17:30:35 -04:00
.integration-daemon-start Remove gccgo support 2016-08-24 11:09:35 +01:00
.integration-daemon-stop
.integration-test-helpers Move some test fixtures to go 2016-09-07 17:30:35 -04:00
.validate
binary Add make install task 2016-06-03 12:08:33 +02:00
binary-client Add make install task 2016-06-03 12:08:33 +02:00
binary-daemon Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
build-deb Propagate BUILD_APT_MIRROR and consume in buil-deb 2016-09-07 10:57:00 -04:00
build-integration-test-binary Verify integration tests before building bundles 2016-09-06 20:27:28 -04:00
build-rpm Add selinux policy per distro 2016-08-04 14:29:22 -07:00
clean-apt-repo
clean-yum-repo
cover All supported Go versions have -cover now 2016-08-25 18:24:35 +01:00
cross Add make install task 2016-06-03 12:08:33 +02:00
dynbinary Fix spelling in comments, strings and documentation 2016-07-03 20:58:11 +03:00
dynbinary-client Make dockerd debuggable 2016-04-26 09:35:22 -07:00
dynbinary-daemon docker-proxy: Force external linking to add BuildID information to please rpm 2016-07-12 19:59:48 -07:00
generate-index-listing deb: skip hidden files when generating indexes 2016-08-03 12:58:14 +02:00
install-binary Add make install task 2016-06-03 12:08:33 +02:00
install-binary-client Add make install task 2016-06-03 12:08:33 +02:00
install-binary-daemon Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
install-script
README.md
release-deb Make release scripts architecture-agnostic and add ARM support 2016-08-11 11:18:52 -07:00
release-rpm release-rpm: fix bad destination paths for rpms 2016-08-12 16:51:12 -07:00
run Add target for make run 2016-07-08 16:25:21 -04:00
sign-repos
test-deb-install Update build-deb to make correct use of DOCKER_BUILD_PKGS 2016-05-02 11:22:01 -07:00
test-docker-py Output docker-py test results in xunit format 2016-08-31 09:35:49 -07:00
test-install-script
test-integration-cli Support interactive integration testing. 2016-08-05 12:07:28 -04:00
test-integration-shell Support interactive integration testing. 2016-08-05 12:07:28 -04:00
test-old-apt-repo
test-unit All supported Go versions have -cover now 2016-08-25 18:24:35 +01:00
tgz Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
ubuntu Make manpages in a conatiner. 2016-07-22 16:32:51 -04:00
update-apt-repo
validate-dco
validate-default-seccomp
validate-gofmt
validate-lint
validate-pkg
validate-test Move some test fixtures to go 2016-09-07 17:30:35 -04:00
validate-toml
validate-vendor
validate-vet
win

This directory holds scripts called by make.sh in the parent directory.

Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example:

./hack/make.sh test
./hack/make.sh binary ubuntu

# Or to run all bundles:
./hack/make.sh

To add a bundle:

  • Create a shell-compatible file here
  • Add it to $DEFAULT_BUNDLES in make.sh