Commit Graph

29 Commits

Author SHA1 Message Date
74f0d78beb Enable construction of TruncIndex from id array.
Fixes #5166

Current graph.restore is essentially O(n^2 log n) due to how
suffixarray creation works.

Rather than create/append/create new this supports creation from a seed
array of ids.

Functional testing shows this eliminates the hang on Creating image
graph reported on list.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 4f169c2db512d2ea9ed5729df375896a1ee90347
Component: engine
2014-04-11 16:39:58 -04:00
7f3a663aad Move DNS options to hostconfig
The local resolver warning needed to be moved at daemon start because it
was only show for the first container started anyways before having a
default value set.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 919dbbe44df0722ca35538223a9c89e71856ec88
Component: engine
2014-04-07 19:12:22 -07:00
3a7c03a563 Ensure that selinux is disabled by default
This also includes some portability changes so that the package can be
imported with the top level runtime.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 82f37b874ea17c5e0040f3e41dc761c88d576e33
Component: engine
2014-04-07 14:44:53 -07:00
8770121953 Clean runtime create and make it simple
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 1277885420b069abd7468fe3e69deb4fb0a3f4fc
Component: engine
2014-04-07 12:20:23 -07:00
786c7662ab Move history to separate file
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: c987aa09d81a6916e3893c41b7ec2880570b5c65
Component: engine
2014-04-07 11:01:35 -07:00
91572b0294 Remove runtime options from config
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e2779e11db113c5551094dba8079d44d8a210e41
Component: engine
2014-04-03 04:40:38 +00:00
2ec7753394 Send sigterm and wait forever
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 93779cc7fee4ee0690d9dd28eed478a418e79577
Component: engine
2014-04-01 07:12:50 +00:00
8169d6ecd6 Ensure state is saved to disk after we kill the ghost
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e36d89b0f9c8ba5b071374310ca632f6b2fdb7a1
Component: engine
2014-04-01 07:12:50 +00:00
5f13c09028 Ensure a reliable way to kill ghost containers on reboot
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5bb82f6313d7f789783ffac854be85a44a56617e
Component: engine
2014-04-01 07:11:41 +00:00
b36db3b674 Add kill for other drivers on restart
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5b9069bd990dca0a35d8e490c6f6b56d27163bb8
Component: engine
2014-04-01 07:11:41 +00:00
357e0a3599 Ensure that all containers are stopped cleanly at shutdown
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f067e263677fc86f9610ca61fbe42f63efad91f2
Component: engine
2014-04-01 07:11:41 +00:00
6d04587343 Remount /var/lib/docker as --private to fix scaling issue
If an admin mounts all file systems as -rshared (Default on RHEL and Fedora)
we see a scaling problem as the number of container increase.

Basically every new container needs to have it new mounts in /var/lib/docker
shared to all other containers, this ends up with us only able to scale to
around 100 containers, before the system slows down.

By simply bind mounting /var/lib/docker on its and then setting it private,
the scaling issue goes away.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 792bb41e524615486ef8266b7bf4804b4fe178f1
Component: engine
2014-03-28 09:19:21 -04:00
f757666ccd This patch adds SELinux labeling support.
docker will run the process(es) within the container with an SELinux label and will label
all of  the content within the container with mount label.  Any temporary file systems
created within the container need to be mounted with the same mount label.

The user can override the process label by specifying

-Z With a string of space separated options.

-Z "user=unconfined_u role=unconfined_r type=unconfined_t level=s0"

Would cause the process label to run with unconfined_u:unconfined_r:unconfined_t:s0"

By default the processes will run execute within the container as svirt_lxc_net_t.
All of the content in the container as svirt_sandbox_file_t.

The process mcs level is based of the PID of the docker process that is creating the container.

If you run the container in --priv mode, the labeling will be disabled.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4c4356692580afb3971094e322aea64abe0e2500
Component: engine
2014-03-26 15:30:40 -04:00
2352431354 rename lxc to bridge
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 8944fb2e9b07d5a764f8d48065b9afd73364f640
Component: engine
2014-03-20 21:51:28 +00:00
c037f13ab8 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: fbfac21ed4de550ce72d993810dc07a2c4877a88
Component: engine
2014-03-19 10:49:25 -04:00
cdf7c6a1a7 btrfs: build tags
Default to the same build behavior, but allow a go build tag to disable
building of the btrfs graphdriver

	go build -tags no_btrfs' ...
	$ go build
	$ objdump -S docker | grep btrfs | wc -l
	194
	$ go build -tags no_btrfs
	$ objdump -S docker | grep btrfs | wc -l
	1
	# that is a comment ;-)

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 85a62d9b779bfb351e159f38c2fc95900a0532cd
Component: engine
2014-03-18 13:44:22 -04:00
b02e8511f3 runtime: no build tags for vfs driver
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 448b64164df7795cdbd9be0d663269e6e4e4beeb
Component: engine
2014-03-17 21:54:43 -04:00
0ba8b13022 graphdriver: build tags
Enable build tags for all the graphdrivers to be excludable.

As an example:
```
$ go build
$ ls -l docker
-rwxr-xr-x 1 vbatts vbatts 18400158 Mar 14 14:22 docker*
$ go build -tags "exclude_graphdriver_aufs exclude_graphdriver_vfs exclude_graphdriver_devicemapper"
$ ls -l docker
-rwxr-xr-x 1 vbatts vbatts 17467068 Mar 14 14:22 docker*
```

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 670ce98c60dbac1d46a59bd69bd20b569f4794f1
Component: engine
2014-03-17 21:54:05 -04:00
8d099b8012 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2bddcd68b4b927d36ffadd80e098f6d4ae2cf5d6
Component: engine
2014-03-17 11:41:28 -07:00
742b723fc2 Move graphdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 96c4816cef592a98a235010924bb2417c8451079
Component: engine
2014-03-17 11:40:12 -07:00
68860e9695 Move execdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: af385151ceedde097eda8a5195b431e8076cf76b
Component: engine
2014-03-17 11:40:12 -07:00
4b7a6e2613 Move networking drivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2230c9b9a735d731cc2fee4137633eb98b9da9d5
Component: engine
2014-03-17 11:40:12 -07:00
19c6fcaf73 Merge pull request #4653 from creack/fix_expose_cache
Fix expose cache
Upstream-commit: 28a9ff7f2557d88174b46482a5b402c511684cf7
Component: engine
2014-03-14 16:09:13 +02:00
0fda3b88ac Don't kill by pid for other drivers
Closes #4575
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3fa99b35b05d9159d6f7f4c7465dec747da2c4e1
Component: engine
2014-03-13 15:04:23 -07:00
c733b13d1a Fix EXPOSE cache miss issue
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: ab26c16b32420011b0aee3de1a3bce5a0afd6f4d
Component: engine
2014-03-13 13:58:09 -07:00
7a46914030 Don't use separate bind mount for container
Since we're not not mounting anything but the base filesystem outside
the container we no longer need the separate bind mount at
/var/lib/docker/container/$id/root in order to see the base filesystem
without extra mounts. So, we drop this and mount (again) the container
root directly at the real basefs mountpoint.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: bf1b27dfcc6c4e049706d7d104e1abc5c330815d
Component: engine
2014-03-13 20:08:29 +01:00
746b307c72 Move all bind-mounts in the container inside the namespace
This moves the bind mounts like /.dockerinit, /etc/hostname, volumes,
etc into the container namespace, by setting them up using lxc.

This is useful to avoid littering the global namespace with a lot of
mounts that are internal to each container and are not generally
needed on the outside. In particular, it seems that having a lot of
mounts is problematic wrt scaling to a lot of containers on systems
where the root filesystem is mounted --rshared.

Note that the "private" option is only supported by the native driver, as
lxc doesn't support setting this. This is not a huge problem, but it does
mean that some mounts are unnecessarily shared inside the container if you're
using the lxc driver.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 6c266c4b42eeabe2d433a994753d86637fe52a0b
Component: engine
2014-03-13 20:01:29 +01:00
57e56c8558 Move execdriver construction into execdriver/execdrivers
This can't be in execdriver (dependency loop) but should not be
hardcoded inside runtime.go either. So we put it in a subpackage.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 07c35b41a5a93f31111d47afcb1e6d2926b492a0
Component: engine
2014-03-11 16:37:19 +01:00
060a86aead Move runtime and container into sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 36c3614fdde079fad178390f651945fba884668a
Component: engine
2014-03-09 23:03:40 -07:00