Commit Graph

314 Commits

Author SHA1 Message Date
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
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
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
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
943cd7996b on docker start, do not cleanup if already running
Upstream-commit: bc6d87284174c1a862603a2da574ff60bb03e0fa
Component: engine
2013-11-11 18:15: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
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
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
b89c66d724 prevent panic if you use API in a wrong way
Upstream-commit: 49d7b87cfc4385470a5ecf181f92c13b8391c002
Component: engine
2013-11-07 18:54:00 -08: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
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
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
f8fdcccb61 rebase
Upstream-commit: 7ddd4fe66a00266507848e8ebc1ce3782532b51d
Component: engine
2013-11-01 14:01:32 -07:00
5e4f415366 Refactor HostConfig and escape apparmor confinement
Upstream-commit: 31638ab2ad2a5380d447780f05f7aa078c9421f5
Component: engine
2013-11-01 13:55:19 -07:00
5287e87035 Merge pull request #2492 from dotcloud/publish-all-flag
Add -P flag to publish all exposed ports
Upstream-commit: 65ba2868d7e0084f5edd2fc836d032f39ec39b9a
Component: engine
2013-11-01 10:21:02 -07:00
a1a49c8919 Container memory limit can be specified in kilobytes, megabytes or gigabytes
-m 10  # 10 bytes
    -m 10b # 10 bytes
    -m 10k # 10240 bytes (10 * 1024)
    -m 10m # 10485760 bytes (10 * 1024 * 1024)
    -m 10g # 10737418240 bytes (10 * 1024 * 1024 * 1024)

Units are case-insensitive, and 'kb', 'mb' and 'gb' are equivalent to 'k', 'm' and 'g'.
Upstream-commit: 9ee9d2f9959390d1cda56accbbd975df18d157ad
Component: engine
2013-11-01 12:00:17 +00:00
fb9771da9e Move archive.go to sub package
Upstream-commit: 96d1e9bb5a269936afeb9748a894f6995b17e0a4
Component: engine
2013-10-31 16:57:45 -07:00
44da76a732 Add -P flag to publish all exposed ports
Upstream-commit: 652f07bb59e9c46d5f3e375c4a99d0b23771e0ad
Component: engine
2013-10-31 11:28:30 -07:00
33735534d9 Merge remote-tracking branch 'upstream/master'
Conflicts:
	container.go
Upstream-commit: b543516556bc71663e1db16c026eda378816548a
Component: engine
2013-10-31 10:53:40 -07:00
67465c23f0 Fixed problem with variables containing \n.
The /.dockerenv file is now a marshalled json array so that environment
variables with \n and other weird values are supported.
Upstream-commit: 1c3a674444c6a6f08ea5ce3812046a00678e4a29
Component: engine
2013-10-31 01:19:32 +01:00
fe428bd3cd Support copying value from env with -e option.
Upstream-commit: 25c4c87c86aca2f17363dbcd9d7bc47640ff9c23
Component: engine
2013-10-31 01:19:09 +01:00
303967e843 Set environment variables using a file.
Upstream-commit: be7eb4bfcb09e17a2c45179bab268ba15050cb6a
Component: engine
2013-10-31 00:48:12 +01:00
15ee14c05a Hotfix: Migrate public mappings after upgrade
Upstream-commit: 746ba127bfb3556d378ccd8b2c725b490d090334
Component: engine
2013-10-30 08:15:12 -07:00
c452ed1a32 Enable sig-proxy by default in run and attach
Upstream-commit: e0b59ab52b87b8fc15dd5534c3231fdd74843f9f
Component: engine
2013-10-29 11:18:34 -07:00
7ce1e20657 Add -name for docker run
Remove docker link
Do not add container id as default name
Create an auto generated container name if not
specified at runtime.
Upstream-commit: 0d2924408bad7aa797bfaf0610e836d82928296f
Component: engine
2013-10-28 18:09:08 -07:00
576fafed48 Rename all cases of "docker-init" to "dockerinit" for consistency
Upstream-commit: cf86e2bb226c82a991eb392e426e707cf8193c03
Component: engine
2013-10-25 15:13:25 -07:00
cd17fb7c91 Move ListOps to utils submodule
This will be needed for later use in docker-init without a docker
dependency
Upstream-commit: d063c8d941d366e4815b91c4fa4fc91fc1e1eb23
Component: engine
2013-10-25 15:13:24 -07:00
952ac8a789 Add links for container relationships and introspection
Upstream-commit: 1cbdaebaa1c2326e57945333420d25d6f77011d5
Component: engine
2013-10-25 15:13:24 -07:00
17d84be4be Merge pull request #2385 from dotcloud/suppress_even_more_warnings_test
Improve tests again, remove warnings and prevent some mount issues
Upstream-commit: ff567f87293bfea3f9750bf2b07d97d7f3d1d85c
Component: engine
2013-10-25 15:04:56 -07:00
281b188b3c fix workdir, hostname tests and a bunch on mount issue
Upstream-commit: a675e249b133fe35eaf02fb0bdb807cfd4efe969
Component: engine
2013-10-24 16:57:35 -07:00
a76023f483 Ignore ErrClosedPipe for stdin in Container.Attach.
But pass `err` in the error channel anyway; don't ignore it anymore.
Upstream-commit: b9eb5e04aeac870a9a45ae8961cfb3578af26787
Component: engine
2013-10-24 15:04:58 -07:00
d8ab9dfa35 fix race condition in docker build with verbose + cleanup hostIntegration debug
Upstream-commit: 10e10c9573a0f20243212192fa782feb35651b18
Component: engine
2013-10-22 15:01:06 -07:00
fbbaaa37c7 Fix attach race condition, improve unit tests, make sure the container is started before unblocking Start
Upstream-commit: 3e014aa6624bdc3411bb6f5bc2c297e45a47ad68
Component: engine
2013-10-18 16:26:16 -07:00
b3613b29c9 Fix issue killing container while sending signal
Fix rebase issue
Update docs
Upstream-commit: 333bc23f21e8423d3085632db99a6d1df227c5f1
Component: engine
2013-10-18 16:19:27 -07:00
02bbabf14d Add -nostdin and -proxy to docker attach, allow arbirary signal to be sent via docker kill api endpoint
Allow attach from `docker start`
Add host integration script generation
Update doc with host integration
Upstream-commit: 4918769b1ac2d38f23087b766140e6a7f8979310
Component: engine
2013-10-18 16:16:29 -07:00
ff708a52c9 Merge pull request #2242 from jpetazzo/remove-spurious-errors-and-errclosedpipe
Fix error/debug messages in Container.Attach and recover from ErrClosedPipe
Upstream-commit: 3ba989378692e90d3f06ab087b814fcf1a8eacd9
Component: engine
2013-10-16 17:27:23 -07:00