Commit Graph

354 Commits

Author SHA1 Message Date
8118fea381 Merge pull request #2775 from daniel-garcia/2671-bindmount_files
fixes #2671, add support for bind mounting individual files in to contai...
Upstream-commit: d6cdbca6c118a1022f6cb4cd5e260a01aa342009
Component: engine
2013-12-02 09:30:08 -08:00
fb39460944 Add a GetPtyMaster() method to container to retrieve the pty from an other package.
We could also have put ptyMaster public, but then we need to ignore it in json
otherwise the Marshalling fails. I think it is cleaner that way.
Upstream-commit: fbebe20bc69648c046e3818ca744ae246092a782
Component: engine
2013-11-29 07:40:44 -08:00
2e819ef8cf fixes #2671, add support for bind mounting individual files in to containers, rebases of #1757 #2301
Upstream-commit: 0198f8a879df8506189cf3024c4b64c9ea8f6aa6
Component: engine
2013-11-21 23:40:35 -06:00
cf914fd88c Merge branch 'master' into 0.6.5-dm-plugin
Conflicts:
	container.go
	image.go
Upstream-commit: 0cecc2a78c246a5b809954059650a4c22442e0d6
Component: engine
2013-11-21 17:18:41 -08:00
b82d2b8801 Merge pull request #2798 from dotcloud/fix_state_race
Refactor State to be 100% thread safe
Upstream-commit: 25e443a3c7f55d5ccfb1f5a96c427bd50b978f4d
Component: engine
2013-11-21 16:39:50 -08:00
915356af08 Refactor State to be 100% thread safe
Upstream-commit: 33e70864a2c4321bf6968d6d521c159a1b72b220
Component: engine
2013-11-21 16:34:58 -08:00
b7afbe130d Merge pull request #2304 from unclejack/fix_layer_size_computation
Fix layer size computation: handle hard links correctly
Upstream-commit: f7c2a00557a304af753e487d87ef5ed9b6266e27
Component: engine
2013-11-21 16:10:24 -08:00
68f143de04 Merge pull request #2794 from dotcloud/fix_status_code_and_usage
fix status code and usage
Upstream-commit: bcdeb37bb64eca25bee9b1736a53f8ef4684c9a0
Component: engine
2013-11-21 13:48:38 -08:00
9dfa0ceb9c Revert "Lock state before we modify."
This reverts commit d7e2fc898284fe29ed43f7b28eae56e7e052e854.
Upstream-commit: cb70eedfdad40538983f9610322262ce84e284a0
Component: engine
2013-11-21 12:11:25 -08:00
06096928cc Return status exit status 2 on usage, move parserun into commands.go, display usage on stderr
Upstream-commit: 75a7f4d90cde0295bcfb7213004abce8d4779b75
Component: engine
2013-11-21 11:43:07 -08:00
7a482f2a8c Lock state before we modify.
When we start a container we lock state, we should do the same in stop.

Detected via -race.
Upstream-commit: d7e2fc898284fe29ed43f7b28eae56e7e052e854
Component: engine
2013-11-21 08:06:02 -05:00
f3c5785b7c Fix image size calc on initial save
Upstream-commit: 8fdbf46afbcad9e4eab79b2804261b084267b6e4
Component: engine
2013-11-20 14:51:04 -08:00
48e095ca19 Merge branch 'master' into vieux_merge_master
Conflicts:
	runtime.go
Upstream-commit: cd022376b8eda39ac23debc6b52fee46e08fcfdb
Component: engine
2013-11-19 17:32:08 -08:00
fa7c88b484 fix container size computation: handle hard links
This change makes docker compute container size correctly.

The old code isn't taking hard links into account. Containers could
seem like they're up to 1-1.5x larger than they really were.
Upstream-commit: 78c843c8eff64da5e12725bdb111b18e51d82606
Component: engine
2013-11-19 13:53:34 +02:00
99bee9426b Implement fallback for getting the size of a container
This moves Driver.Size() to Differ.DiffSize(), removing the empty
implementations in devmapper and dummy, and renaming the one in aufs.

Then we fall back to a container.Changes() implementation in the non-aufs
case.
Upstream-commit: 5d76681c3d0cbb744205a397420603ce029ce754
Component: engine
2013-11-19 10:36:54 +01:00
4d58ddf15b fix container restart race condition
Finish container cleanup before setting the state to stopped.
Otherwise, for an application that exits quickly, a call to Restart
can allow Start to be called again before cleanup is done, resulting in
overritten data in the Container struct.
Upstream-commit: fc2f5758cf22fe5d3d46be7e4642abc0735e2c8d
Component: engine
2013-11-18 11:42:30 -06:00
b264af0c15 Save driver to container and skip incompat containers
For people who toggle drivers we want to save the driver used
to create a container so that if the driver changes we can skip
loading the container and it should not show up in docker ps
Upstream-commit: 4908d7f81db91f4a28be152ec0cacb0cf711b403
Component: engine
2013-11-14 22:53:59 -08:00
7686e1f389 Merge branch 'master' into shykes-0.6.5-dm-plugin
Conflicts:
	utils.go
	utils_test.go
Upstream-commit: 7cf60da38880534d76d031c4646fbd469d922385
Component: engine
2013-11-14 14:02:44 -08:00
bf15883f56 Merge pull request #2445 from alexlarsson/fix-shared-root-from-dm
Fix lxc start for shared root filesystems 
Upstream-commit: 629c6e36492336f01fd4e25426a5c875f52628e2
Component: engine
2013-11-14 11:20:53 -08:00
084cb15f1a Allow drivers to implement ApplyDiff in Differ interface
Upstream-commit: 5d9723002bc764e2c768e5184994d7949f55fc49
Component: engine
2013-11-11 19:09:57 -08:00
943cd7996b on docker start, do not cleanup if already running
Upstream-commit: bc6d87284174c1a862603a2da574ff60bb03e0fa
Component: engine
2013-11-11 18:15:38 -08:00
b93991acb1 Add ability to exclude files from tar
Upstream-commit: 2c7f50a77dc281289387008b4a08656e7e5328be
Component: engine
2013-11-11 14:30:38 -08:00
6a146241db Merge branch 'master' of https://github.com/zilin/docker into zilin-master
Conflicts:
	container.go
Upstream-commit: 4c7d24bc8b4bf436ba72d98089767e72a8f3f960
Component: engine
2013-11-11 12:59:18 -08:00
abd8707658 Merge pull request #2140 from SvenDowideit/2098-run-cidfile-should-return-longid
Server: always return long id's
Upstream-commit: 87c8437a900e683547278fcdd92de71ed8a866e3
Component: engine
2013-11-11 13:06:19 -08:00
fac387b017 Merge branch 'master' of https://github.com/aanand/docker into aanand-master
Upstream-commit: da24945070e305e09d4d96d1f981614eaa18b01f
Component: engine
2013-11-11 12:34:16 -08:00
86d455035f Remove Differ and Changer interfaces
Add the methods to the Driver interface
to force the drivers to implement the methods
Upstream-commit: 4d1a537433ede2bbc75b0a4817e8121f9e03fd86
Component: engine
2013-11-11 12:10:53 -08:00
122fd6b9c2 Implement fallback operation for driver.Diff()
This moves the Diff() operation to a separate Differ interface and
implements a fallback that uses the Changes() results to encode
a diff tar.
Upstream-commit: e82f8c1661f3fa18e4dc6ca3aebe4dcc46e8961b
Component: engine
2013-11-11 17:46:07 +01:00
d772cfe673 make all image ID and container ID API responses use the Long ID (Closes #2098)
Upstream-commit: b3974abe4f01d408850e245c9b52c77f3571e0b2
Component: engine
2013-11-09 12:16:49 +10:00
82d35959fb Merge pull request #13 from crosbymichael/fix-volume-mount
Do not pass container information when creating a volume
Upstream-commit: 1f35531f396dba279b289a515416351568b96c0a
Component: engine
2013-11-08 16:35:00 -08:00
911620a74d Do not pass container information when creating a volume
Upstream-commit: ddb27268c98941b9f8a131b7b5403eb4d44beebb
Component: engine
2013-11-08 16:11:57 -08:00
28000adccb Allow drivers to export their own diff
Upstream-commit: 1eb00e1d5b375cb79d492f1c5cd95d7317bc543c
Component: engine
2013-11-08 15:32:50 -08:00
e5498d2e58 Return “err” instead of “nil” when MkdirAll() fails when binding a volume
Upstream-commit: e7fdcc15c5eb3812c71dd61f22a8d77d3ae72e36
Component: engine
2013-11-08 22:52:10 +01:00
c94da34819 Make sure dirs are created before injecting file
Upstream-commit: 20f690f1762e369e9ad761e166f22ff57a17275a
Component: engine
2013-11-08 12:06:15 -08:00
b89c66d724 prevent panic if you use API in a wrong way
Upstream-commit: 49d7b87cfc4385470a5ecf181f92c13b8391c002
Component: engine
2013-11-07 18:54:00 -08:00
07ffba21a6 Don't rely on drivers for diff and export
Upstream-commit: 99210c9c6efbe10df922faa66fa3232ab898ef7b
Component: engine
2013-11-08 02:48:52 +00:00
2f4c3fdf6d Merge branch '1887-allow_ro_volumes-from' of https://github.com/daniel-garcia/docker into daniel-garcia-1887-allow_ro_volumes-from
Upstream-commit: f417c4b09955e3b250bec19a0d4b13ff30ba4e80
Component: engine
2013-11-07 17:59:55 -08:00
914824bce7 Move Change to the archive package, and fix a leftover merge in
Container.Inject()
Upstream-commit: 9ae4bcaaf8aa01da340341e47f99f83a59ce91dc
Component: engine
2013-11-08 00:45:07 +00:00
783f801512 gofmt
Upstream-commit: f1127b9308fbb4d4e21c3c5567ace9fdda82559d
Component: engine
2013-11-07 23:58:03 +00:00
c471d2b756 Merge branch 'master' into 0.6.5-dm-plugin
Conflicts:
	container.go
	runtime.go
Upstream-commit: 165d1bdbc0c4236df9afe85d9cd8b1e65d625865
Component: engine
2013-11-07 23:26:52 +00:00
7e3e167f73 Simplify graphdriver interface: Create, Get. No more external mounting or Dir/Image interface
Upstream-commit: f2bab1557c3fef4a95b5b982fe7127fcb29c4f8f
Component: engine
2013-11-07 22:38:50 +00:00
a48448b288 Internal cleanup: use the mounted container filesystem instead of manipulating the aufs layers directly
Upstream-commit: 77ae9789d3e1cfb895de9eaf343866f984c92668
Component: engine
2013-11-07 20:30:56 +00:00
6d24142423 go fmt
Upstream-commit: 6998c3c387518ba8e06ceff00b10be583c95d6cd
Component: engine
2013-11-07 12:27:33 -08:00
5edb271922 lxc: Work around lxc-start need for private mounts
lxc-start requires / to be mounted private, otherwise the changes
it does inside the container (both mounts and unmounts) will propagate
out to the host.

We work around this by starting up lxc-start in its own namespace where
we set / to rshared.

Unfortunately go can't really execute any code between clone and exec,
so we can't do this in a nice way. Instead we have a horrible hack that
use the unshare command, the shell and the mount command...
Upstream-commit: 157d99a72786c454dfaad8b0800914cc80879aa8
Component: engine
2013-11-06 20:43:06 +01:00
73c7a730fc See if a path exists before injecting Reader there
Closes #1965
Upstream-commit: 74f853a2aeaf86ff675ecab5387bbd710a0138b7
Component: engine
2013-11-05 23:44:52 -06:00
26ce0d7e39 disallow / as source for bind mount in the cli
This makes the docker cli reject docker run commands which include bind
mounts like "/:/some/path/in/the/container".
Bind mounting the root directory is a bad idea and the cli should throw
an error right away.

The same check will also be made by the remote API via another commit.
Upstream-commit: 4b8c41c4a2591797f97ad079e4314b21498ba732
Component: engine
2013-11-05 22:52:54 +02:00
6c362cebcc Add ability to mount volumes in readonly mode using -volumes-from
Upstream-commit: f9cb6ae46a3478c19e85a2a159c4ac31223ec499
Component: engine
2013-11-05 11:58:51 -06:00
83558bb275 Merge pull request #2525 from dotcloud/fix_hostnames
Fix regression in /etc/hosts
Upstream-commit: 342bd43b766e828753ffec35a6ae9b76e988c483
Component: engine
2013-11-04 11:26:27 -08:00
4092fc1017 Integrate devmapper and aufs into the common "graphdriver" framework.
aufs is still enabled by default, no mechanism for switching drivers
yet.
Upstream-commit: 98c3693acf2db18c0d0c6211498bf6e1d8f068c6
Component: engine
2013-11-04 17:28:35 +00:00
164d9c3b6b Create new network on dead ghosts on restart.
Fixes #2089
Upstream-commit: 95708dd35cd94a2c849e37efa05bb4e01ed36bb8
Component: engine
2013-11-03 14:13:18 -05:00
f2a6417e83 fix regression in /etc/hosts
Upstream-commit: f3685333c0fdea58c8e6adbc93c95ebbc4a9fa47
Component: engine
2013-11-01 15:46:26 -07:00