Commit Graph

47 Commits

Author SHA1 Message Date
8b12ac14d7 API: Provide the HostConfig during "run".
Currently, the HostConfig is only passed from the CLI to Docker only
when issuing a docker create, but not when doing a docker run.

In the near future, in order to allocate ports at creation time rather
than start time, we will need to have the HostConfig readily available
at container creation.

This PR makes the client always pass the HostConfig when creating a
container (regardless of whether it's for a run or create).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 1df87b95066198c30312147393c18e0be0564fd0
Component: engine
2014-09-25 15:24:38 -07:00
13e3017817 Use State as embedded to Container
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: e0339d4b88989a31b72be02582eee72433d2f0ec
Component: engine
2014-09-03 00:01:11 +04:00
c2d0e99a2a move TestEntrypoint & TestBindMounts
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 5b27fbc0e27358b794946fe9e84a83a6c4497be4
Component: engine
2014-08-28 00:25:10 +00:00
e59ed0e9b1 move TestKillDifferentUser
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: eb9379c5d05848c525f7c3d75b66a4b356227d57
Component: engine
2014-08-27 23:34:37 +00:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
d628315a52 Move TestCopyVolumeContent to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: e88487b321fba4d1a6d9dcd080ec5b9ae024865e
Component: engine
2014-07-19 12:42:27 +04:00
c0a07344c1 Move TestCopyVolumeUidGid to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 9a7c5be7d1d71d339b857ec20ca03cc09d4bbfa2
Component: engine
2014-07-19 12:42:27 +04:00
8ae73ea011 Move docker restart tests to integration cli
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 9da6c80533f80060575840e1e2fd80cc11826f7b
Component: engine
2014-07-02 21:56:19 +01:00
ae1f05d70a Pause/freeze containers during commit
Initiates a pause before committing a container,
adds a pause option to the commit command, defaulting to 'true'.

Fixes bug: #6267
Fixes bug: #3675

Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch)
Upstream-commit: 17d870bed5ef997c30da1e8b9843f4e84202f8d4
Component: engine
2014-07-01 00:30:21 +00:00
53991068e0 Use State waiting functions
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 57d86a5619adae5e08e0e28fba99f6a7c2f5ee54
Component: engine
2014-06-27 15:07:40 +04:00
cb6c5cfbb8 Fixes permissions on volumes when dir in container is empty
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: ff7b52abd3f26d9650c2e674400d58fbe8157ad8
Component: engine
2014-04-28 16:57:28 -04:00
42d84ccd4c Port privileged tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 296fcf331f2886d2aba3cfb929887dfbb603643d
Component: engine
2014-04-18 03:20:17 +00:00
a871063b21 Port networking tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: caad45d0edd9c1e48eac6e0ae0889039ca6844fc
Component: engine
2014-04-18 03:12:27 +00:00
1437557de2 Port environment test
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 47510bd6eb83c43450ba53cb3db13aa340e8226c
Component: engine
2014-04-18 02:53:08 +00:00
e3eecbd979 Port user tests and concurrent tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e2ed4b9077a46adbe3e4388166bb41969f7fb425
Component: engine
2014-04-18 02:47:39 +00:00
a4830050bf Port volumes and exit code tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 03993eb5340f1d520e23eac3dfe01d604fe7297f
Component: engine
2014-04-18 02:34:10 +00:00
94560a8cac Update commit test in cli
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 6beb858fb0290137c787c9728d84436461c352a0
Component: engine
2014-04-18 02:24:19 +00:00
77c1ab46b6 Port multiple attach test to cli tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 72f49e554f4d4345238b983d0c820e1e3320f9e5
Component: engine
2014-04-18 02:14:00 +00:00
fa56c6f0d6 Add test verify container ID
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 76a19bb3a95ef788cd889b36b0af3b79327ff431
Component: engine
2014-04-18 01:58:20 +00:00
f7be50364d Rename runtime/* to daemon/*
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 359b7df5d2af5733b8a1ea6746d062053053b23e
Component: engine
2014-04-17 14:43:01 -07:00
ecfa4893ce Move volumesfrom to hostconfig
This also migrates the volumes from integration tests into the new cli
integration test framework.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: af9746412b6070063f105ae97eba1f8fbd56bd22
Component: engine
2014-04-08 21:45:06 +00:00
e940d2f8fa Remove restart ghost test
We do not allow ghosts anymore and this test does not add any value
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 77a04357a1b66b9e5b2bae2efc0192b927f926fe
Component: engine
2014-04-08 20:56:30 +00:00
42964a36b7 Allow non-privileged containers to create device nodes.
Such nodes could already be created by importing a tarball to a container; now
they can be created from within the container itself.

This gives non-privileged containers the mknod kernel capability, and modifies
their cgroup settings to allow creation of *any* node, not just whitelisted
ones.  Use of such nodes is still controlled by the existing cgroup whitelist.

Docker-DCO-1.1-Signed-off-by: Kevin Wallace <kevin@pentabarf.net> (github: kevinwallace)
Upstream-commit: c94111b61988ad32d87f99d4421cbcde018c3fb4
Component: engine
2014-04-03 18:44:13 +00:00
a2ee3725a5 Update test to be consistent
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: 7a50f03fa69fb81c27d361333fadbc9cccdd8948
Component: engine
2014-04-01 10:27:10 -07:00
ad6fffc689 Adjust TestOnlyLoopbackExistsWhenUsingDisableNetworkOption to ignore "DOWN" interfaces
This fixes the following, which I've been seeing on all my machines for as long as I can remember:

--- FAIL: TestOnlyLoopbackExistsWhenUsingDisableNetworkOption (0.36 seconds)
	container_test.go:1597: Wrong interface count in test container: expected [*: lo], got [1: lo 2: sit0]

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: ad3e71d5c7e01dca229d4077cf8b019d8085c33a
Component: engine
2014-03-27 11:06:32 -06:00
73c73fe476 Add failing test case for issue #4681
Add a failing test case for an issue where docker is not creating a loopback device if networking is dissabled.

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
Upstream-commit: 53c5b1856d91093fed1c2d3f038d227f5fdef4b8
Component: engine
2014-03-17 22:01:24 +01:00
32c417d5a0 Fix spelling of benchmark test
Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 5583774e29911bbd42181e8db2ece08761677cf3
Component: engine
2014-03-15 11:38:31 -04:00
c48adc6929 Update to double-dash everywhere
These were found using `git grep -nE '[^-a-zA-Z0-9<>]-[a-zA-Z0-9]{2}'` (fair warning: _many_ false positives there).

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 44fe8cbbd174b5d85d4a063ed270f6b9d2279b70
Component: engine
2014-03-13 11:46:02 -06:00
9649d5107a Remove container env var from libcontainer
Update tests to use native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 431d510cae85bc1265c861028dd9751ae95088b2
Component: engine
2014-02-24 21:51:00 -08:00
aef5af9f3c Cgroups allow devices for privileged containers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: a76407ac61dd57429a1350f840c323f45a97b27f
Component: engine
2014-02-24 15:47:23 -08:00
4c203f5a85 Add info for driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: cfd188e9251f5047e4fd677fe8f2921ae28b8bcc
Component: engine
2014-02-24 14:11:09 -08:00
e378922981 Move the canonical run configuration objects to a sub-package
* Config is now runconfig.Config
    * HostConfig is now runconfig.HostConfig
    * MergeConfig is now runconfig.Merge
    * CompareConfig is now runconfig.Compare
    * ParseRun is now runconfig.Parse
    * ContainerConfigFromJob is now runconfig.ContainerConfigFromJob
    * ContainerHostConfigFromJob is now runconfig.ContainerHostConfigFromJob

This facilitates refactoring commands.go and shrinks the core.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 6393c38339e11b4a099a460ecf46bb5cafc4283b
Component: engine
2014-02-11 20:18:46 -08:00
f84d85cd37 Move test cpu shares out of test start
Fixes #2107
Upstream-commit: 0d1506adb30ecd56f5e413c3ff376a1acfbe3697
Component: engine
2013-12-04 16:31:09 -08:00
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
b0f24a88da Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
Upstream-commit: a4f8a2494b0fb755db52c68cf61ddc8ff52d2965
Component: engine
2013-11-30 00:25:46 +00:00
014494a3f4 Make race condition more obvious by performing more asserts
Upstream-commit: ad43d88af5bda8dc5b3d06f64de380bb985191ba
Component: engine
2013-11-28 16:12:45 -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
915356af08 Refactor State to be 100% thread safe
Upstream-commit: 33e70864a2c4321bf6968d6d521c159a1b72b220
Component: engine
2013-11-21 16:34:58 -08:00
cdb93a78ac Merge branch 'master' into 0.6.5-dm-plugin
Conflicts:
	server.go
Upstream-commit: 2382a0f920f7473b2b2762d886470a417a5dbac7
Component: engine
2013-11-20 11:07:42 -08:00
e7eec12a53 Fix unit-tests
Upstream-commit: 12e993549df025d072add1a0bcb9bfcc7fe5bdb5
Component: engine
2013-11-19 15:24:14 -08:00
b6950e3878 Merge branch 'master' into creack-merge-master
Conflicts:
	api_params.go
	graph.go
	graph_test.go
	image.go
	integration/api_test.go
	integration/container_test.go
	integration/runtime_test.go
	runtime.go
Upstream-commit: 28d4cbbc59e419f00c1ad75991b106241933ca5d
Component: engine
2013-11-19 14:58:12 -08:00
c4cad6571f test: remove extra args in TestExitCode
The extra blank argument isn't needed and confuses libvirt.
Upstream-commit: 4b80ec9aae2f43e831de64f3746c7838252e9203
Component: engine
2013-11-18 15:07:11 -06:00
b0f8db9d1b test: skip TestCreate on Fedora due to lxc utils bug
In the dind environment running on a Fedora host, the lxc utils get
confused by the /sys/fs/cgroup/cpuacct,cpu cgroup mount and lxc-start
fails trying to access the wrong cgroup directory.
Upstream-commit: 72d02ecdde2ba6f39739a0a942f2c4a057b4d45f
Component: engine
2013-11-18 10:23:30 -06:00
7456f6a466 fix Integration tests
Upstream-commit: 661a8a0e0ce95d9bcb222184c14373fb1dbb1aec
Component: engine
2013-11-14 14:46:13 -08:00
1880f01ff8 Integration tests: remove dependency on private APIs
Upstream-commit: c001a5af67b7b811a8fc69011fcffc2656b8fd99
Component: engine
2013-11-14 10:50:43 -08:00
6c1679864e Move integration tests to integration/, expose missing public methods in the core
Upstream-commit: 359a6f49b9ec704686d0cb0df7cb0d7c8d5f55a7
Component: engine
2013-11-14 10:50:00 -08:00