Commit Graph

162 Commits

Author SHA1 Message Date
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
5eea23ed5b add tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 5b82a1b726291d4aaaad797df5b29a74de28d318
Component: engine
2014-01-30 00:55:29 +00:00
af8535454e fix ID -> Id api
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 54072dbbd6260a9d8a7249cae0bd17513f15c3fc
Component: engine
2014-01-29 20:31:49 +00:00
3fc86028ff move api to it's own package
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: f556cd4186dfdb5e96b2e58b5caf9edbe7e2d7df
Component: engine
2014-01-29 19:26:54 +00:00
58d0cfe3cb Remove api_params.go
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 217ad5e5e673aa09471e95f4726ddab2422fe5d1
Component: engine
2014-01-29 18:52:54 +00:00
80cd671c19 Improve test for container list ps
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 1ee1dc2340ef030fc3ed132ff51d196536b46600
Component: engine
2014-01-26 23:14:50 +00:00
b7a9dba025 Move containers to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 5ea2986ce5cfce1b86fdc92610dbc6d670691168
Component: engine
2014-01-24 16:07:42 -08:00
32ee8c9560 fix error handling
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: f41e0cf0485eac21d65c1af19a732b350292d200
Component: engine
2014-01-24 14:59:46 -08:00
4dfa12a504 Move docker rmi to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 564e6bc7802b606d829a498eee0c2bb8ce4032e1
Component: engine
2014-01-24 14:55:11 -08:00
10c689f549 move pull and import to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9dcbdbc4b1addb67c0fdcadab1c8f98f30e58b4c
Component: engine
2014-01-24 14:46:31 -08:00
31fb352a08 Merge pull request #3558 from tianon/buildfile-run-json
Add support for RUN [""] in Dockerfiles
Upstream-commit: 2a6e93a6fb9870cd2c2e1942afcdea5f154f1715
Component: engine
2014-01-22 11:51:34 -08:00
47913f96e1 Merge pull request #3073 from alexlarsson/refcount-driver-mounts
Refcount driver mounts
Upstream-commit: f61a91f50a753e0b8878675b4bab8ee4dc2a70e1
Component: engine
2014-01-22 11:42:17 -08:00
f98385a1b6 Merge pull request #3712 from plietar/kill-signal
Add a -s option to the kill command to specify a signal.
Upstream-commit: 44a0bab30488f2d6084feaf34389ac305b53ae8d
Component: engine
2014-01-22 11:38:16 -08:00
78636fd4dc Merge pull request #3682 from alexlarsson/implement-tar
Implement tar in Go
Upstream-commit: 639d2ecd4f7a86a34bdde890002129f0b22c85fa
Component: engine
2014-01-22 11:23:47 -08:00
04f201ccfb Add a --signal option to the kill command to specify a signal.
Docker-DCO-1.1-Signed-off-by: Paul Lietar <paul@lietar.net> (github: plietar)
Upstream-commit: 1f75a0bf435fe9a0f118b027e0387ba41e201c66
Component: engine
2014-01-22 06:10:52 +00:00
5bf17309b9 Merge pull request #3706 from creack/fix_wait_stopped
Fix wait on stopped container (after docker restart) + add Unit test for that case
Upstream-commit: 0b789ca84480731ae275569282a8be2e68616196
Component: engine
2014-01-21 17:03:35 -08:00