Commit Graph

177 Commits

Author SHA1 Message Date
587cb127e7 fix flag deprecation warnings in integration tests
This removes three warnings in the integration tests:
Warning: '-viz' is deprecated, it will be removed soon. See usage.
Warning: '-tree' is deprecated, it will be removed soon. See usage.
Warning: '-cidfile' is deprecated, it will be removed soon. See usage.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 35054601d868a82841c220ff474ad47c5d52e871
Component: engine
2014-03-05 16:43:03 +02:00
dc4d93c655 Merge pull request #4327 from crosbymichael/add-libcontainer
Add native execution driver to docker and make it the default
Upstream-commit: 69c69059fc3933531e19c05a9d2e831fb713881c
Component: engine
2014-03-03 16:34:20 -08:00
e3db7f47ed Use a more defensive vendored archive/tar import path to make it clear this isn't upstream's released archive/tar
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 2ca4e0ea60851ff8e9c0a05dc13fa23436c529b6
Component: engine
2014-02-27 09:43:44 -07:00
bec84fb562 Merge branch 'master' into add-libcontainer
Conflicts:
	execdriver/termconsole.go

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: ce08083f9cd23e8f5e44228b0b73884bcf2f3562
Component: engine
2014-02-26 12:55:24 -08:00
fca083e7de Merge pull request #4357 from creack/fix_TestCmdKill
Fix TestCmdKill by closing the pipe before waiting on the container
Upstream-commit: 5908aa350d702bf918b912e70be16898643ccbc3
Component: engine
2014-02-26 12:20:30 -08:00
dbf416cb72 Fix TestCmdKill by closing the pipe before waiting on the container
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 4039fbb1b01365273e99a3cba28db33b38197237
Component: engine
2014-02-25 20:16:17 -08:00
af968e2231 add version pkg
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 8dad771daa6572ca15949d3e53e825f4837c0af9
Component: engine
2014-02-25 21:08:38 +00:00
fcbc1feb4a fix tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 964d82d00506c3005d102b9a1f94848182c5989d
Component: engine
2014-02-25 21:08:08 +00:00
0724fa65be Rewrite docker rmi
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 795ed6b1e511fa6713fbc9ea4e8569aab15b98ff
Component: engine
2014-02-25 21:08:07 +00:00
1bd3fbfadf Address initial feedback from pr
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: de083400b8d7c2074d71a30a92e4f3c8bcd8bad8
Component: engine
2014-02-25 10:54:41 -08: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
4f321caf5c Merge branch 'master' into add-libcontainer
Conflicts:
	runtime.go

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 27a43692c2b114ed9b6418e75d16cbb2e6c7a993
Component: engine
2014-02-24 20:35:12 -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
07cc777e62 Fix tests with dockerinit lookup path
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 01f9815b55742654b2f35d13c3aba6a9e48634c7
Component: engine
2014-02-24 13:40:17 -08:00
95f410bd66 Cleanup integration tests
Refactor integration tests to remove special cases in the creation of
test engines. All test engines are now created through newTestEngine.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 92c3927b5de73f81c490900b2718d218ec097bd3
Component: engine
2014-02-24 19:24:30 +00:00
87c3fb28d2 forbid chained onbuild, from & maintainer triggers
This changes the way onbuild works:
- forbids the chaining of onbuild instructions
- forbids the use of `onbuild from`
- forbids the use of `onbuild maintainer`

It also makes docker throw errors when encountering such triggers when
executing the triggers during `FROM`.

Three tests have been added:
- ensure that chained onbuild (`onbuild onbuild`) is forbidden
- ensure that `onbuild from` is forbidden
- ensure that `onbuild maintainer` is forbidden

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: b829e96cde4f798bc21f05a763b2f6a623dfe1eb
Component: engine
2014-02-20 20:31:04 +02:00
e253c6c2c6 Merge pull request #4168 from crosbymichael/add-listenbuffer
Hold connections until the daemon has fully loaded
Upstream-commit: 4187f4e7504089d11740925a889e923f8adc54a7
Component: engine
2014-02-17 16:04:49 -08:00
c4d3310b03 Merge pull request #4131 from tianon/vendor-golang-xattrs
Add vendored archive/tar that includes xattrs patch
Upstream-commit: f3ff19049138afebe4e28e30be2ee60364204f50
Component: engine
2014-02-17 21:12:28 +02:00
4573ff0486 Merge pull request #4172 from fabiofalci/test_save_and_load
Test for save and load commands
Upstream-commit: bc286d651da368e40d076650b2ccd45cb4820d71
Component: engine
2014-02-17 13:52:44 -05:00
fc1f23f527 Add vendored archive/tar that includes xattrs patch
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: b762d3a7391dd526826a0a1f1c983ea5e54852f5
Component: engine
2014-02-17 08:20:21 -07:00
e94461f78a Test for save and load commands
Improve test for save to tar and load from tar commands.
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 4ab3c31b155997821d5f75689617235fa7386efa
Component: engine
2014-02-17 01:52:50 +00:00
1bea948b6b docker cp error when container doesn't exist
Fix cp api to return a 404 notfound if container doesn't exist.
Fixes #4119.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: a51441278afbfde76ac1ec1e01c619fe5733b895
Component: engine
2014-02-16 15:49:36 +00:00
9fff3868b1 Integration generic socket wait for docker api
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 778f1bf6639e52004608ca2289e04b8f7bddb14b
Component: engine
2014-02-15 20:49:50 -08:00
024e6f564e Move remote api client to api/
This moves `commands.go` out of the core and into `api/client.go`

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: ee59ba969fdd1837fe0151638cc01637e18139c3
Component: engine
2014-02-15 14:55:51 -08:00
0f43c3eb05 Refactor utility MkBuildContext to the more generic archive.Generate
This facilitates refactoring commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 9b56da78e0b1e4e1da9b2bacc44a22143745a2b0
Component: engine
2014-02-15 14:52:08 -08:00
e12f62e6df Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: f198ee525ad6862dce3940e08c72e0a092380a7b
Component: engine
2014-02-14 13:46:17 +01: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
5c232a828b Merge pull request #4074 from shykes/separate-version
Move docker version introspection to a sub-package.
Upstream-commit: 9a9690360c9b013f3962bee74c18397bd411cc6b
Component: engine
2014-02-11 20:16:00 -08:00
e8ca8bfeb8 Fix the tests, too
Seriously.  There's not much codebase left we haven't touched.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 0d871840b202fc31418990bbcbe0df1c4ad689fb
Component: engine
2014-02-11 19:10:23 -07:00
944b4ea1c7 New package nat: utilities for manipulating the text description of network ports.
This facilitates the refactoring of commands.go

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 3ecd8ff0c80c593e1874cbfa0cc2abf946eeaf66
Component: engine
2014-02-11 16:51:01 -08:00
3665663666 Merge pull request #3524 from tianon/supplementary-groups
Add supplementary groups lookup in sysinit
Upstream-commit: 2dcb48af0fa9bba2fb47b08dd2c9747acf09ea44
Component: engine
2014-02-10 14:42:14 -08:00
3b6d4254e4 builder: clearly display ONBUILD triggers during a build.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: ded9e0d6dfbcfe0f2ccd448baf0acb4378365bac
Component: engine
2014-02-04 19:11:56 +00:00
eaeb410e5e New build instruction: ONBUILD defines a trigger to execute when extending an image with a new build
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 9f994c96468e2495a2dc118355b6565e7dac0f44
Component: engine
2014-02-04 01:31:19 +00:00
0da08f6176 docker/config: update -mtu flag default
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
Upstream-commit: 92e61f89aad35c3103e0db1c6dacecc0c588bd2e
Component: engine
2014-02-03 15:36:39 -08:00
0e1ea1b204 Consolidate a bunch of the supplementary-groups tests to cut down on the number of RUN lines in a single Dockerfile within TestBuild
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: e8963748fca208e6015e3cb7981fc0bf07929e3e
Component: engine
2014-01-31 20:15:24 -07:00
1ed42315f3 Move UserLookup functionality into a separate pkg/user submodule that implements proper parsing of /etc/passwd and /etc/group, and use that to add support for "docker run -u user:group" and for getting supplementary groups (if ":group" is not specified)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: ee93f6185be3ae73c16cf41ae397bae3ce2f6c55
Component: engine
2014-01-31 20:15:24 -07:00
a5ec5d6bb6 Merge pull request #3832 from jlhawn/3831-auth-tests-server-address
Prevent Tests from creating users on Prod Index
Upstream-commit: a446b347199b3b19abf06e2ccf115d926917620f
Component: engine
2014-01-31 18:34:13 -08:00
47dc263009 Merge pull request #3872 from crosbymichael/network-driver
Remove networking out of core and into a driver
Upstream-commit: 819c2e3ecaaa1f82401fe76bae1715183426c3cf
Component: engine
2014-01-31 17:22:37 -08:00
4a2ebcd7e5 Merge pull request #3827 from vieux/mova_api_package
Move api into sub package
Upstream-commit: 6a1ee89d2dcd5f2ab99e203862eed4dd8675b070
Component: engine
2014-01-31 15:39:33 -08:00
140db53b4e Move serveapi to api/api.go
Remove api import from server.go
Rename initapi to init server

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9eea7f28f0c64d43ef2a9987999a29774fa1476b
Component: engine
2014-01-31 23:06:00 +00:00
052a914774 Fix integration tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 49b9813035b3abb445ef7238f034897fa03a9652
Component: engine
2014-01-31 12:04:44 -08:00
3044e71de0 Merge pull request #3841 from alexlarsson/separate-base-fs
Separate out graphdriver mount and container root
Upstream-commit: 53ee1daa699ab28fdd37d77b2cfbb0fc14dc0fdb
Component: engine
2014-01-31 11:49:14 -08:00
32d36c4ba5 merge master
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: b881a6c3c2e73f2fd342975239331004f0b59e12
Component: engine
2014-01-31 19:00:06 +00:00
236fdd833b merge master
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 51d280f944eab386ecd67acd6a1878de7b45c8d6
Component: engine
2014-01-31 18:43:34 +00:00
4ca789745b Merge pull request #3829 from vieux/fix_api_regression
Fix ID -> Id api
Upstream-commit: 643c7dc25df4759c1894ba2ff3aa71fe11a06ea4
Component: engine
2014-01-31 10:38:57 -08:00
d1aba4a6ea Remove api_params.go
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 2b52d6e801dd888e1f5759448da025e0ddcffedd
Component: engine
2014-01-31 03:59:14 +00:00
bef9a1a530 remove some mkServerFromEngine
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: fc2f998822699c0c7e22e4fc791d10c3b1ea1e53
Component: engine
2014-01-31 03:34:50 +00:00
6d81dd5d9b Separate out graphdriver mount and container root
This separates out the directory as returned from the graphdriver (the
"base" fs) from the root filesystem of the live container. This is
necessary as the "diff" operation needs access to the base filesystem
without all the mounts that the running container needs (/.dockerinit,
volumes, etc).

We change container in the following way:

Container.RootfsPath() returns the the directory which will be used as
the root in a running container. It is always of the form
"/var/lib/docker/container/<id>/root" and is a private bind mount to
the base filesystem. It is only available while the container is running.

Container.BasefsPath() returns the raw directory from the graph driver
without the container runtime mounts. It is availible whenever the
container is mounted (in between a container.Mount()/Unmount() pair,
which are properly refcounted).

This fixes issue #3840

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: fab19d197c6cc362182f6cee4d0a6e65e799875f
Component: engine
2014-01-30 16:43:53 +01:00
a56f23222b Prevent Tests from creating users on Prod Index
The integration tests had previously used the environment variable
DOCKER_INDEX_URL but it was apparently removed several months ago.

Change the integration auth tests to specify the ServerAddress field
of the AuthConfig struct to use the staging deployment of the index.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: c914abaf15634d8039927176dfc5ff3c765f30d0
Component: engine
2014-01-29 17:18:11 -08:00