Commit Graph

1684 Commits

Author SHA1 Message Date
97834446bf Add build integration cli tests
Clean up tests to remove duplicate code

Add tests which run pull and create in an isolated configuration directory.
Add build test for untrusted tag

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 871d2b96ed5cf234c41a5e731a34fc9deda4e9f1
Component: engine
2015-07-24 16:31:12 -07:00
08efdea505 Add test for incorrect nonroot passphrase
Fix failing tests for create, push, and pull

Signed-off-by: Diogo Monica <diogo@docker.com>
Upstream-commit: eeb6d0a71b754c1c99748f7ba08be27e4d8b8eb9
Component: engine
2015-07-24 14:08:20 -07:00
be6fe06878 Add trust tests for Docker create, run, push, and pull
Created date util function

Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
Upstream-commit: 1406cb35fd814a987b91f92ed1a4b61a21205736
Component: engine
2015-07-24 14:08:20 -07:00
5eae9c3c28 Add more integration tests for trusted push and pull
Signed-off-by: Diogo Monica <diogo@docker.com>
Upstream-commit: 356b07c89602e4f5e9c9d4c53ec24b341b4e7865
Component: engine
2015-07-24 14:08:20 -07:00
b82ed8bb95 Add integration cli trust tests
Added notary server to docker base image.
Created trust suite which runs trust server for running trusted commands.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 58a1de9b59594948df152f0003e759b77bcaa56a
Component: engine
2015-07-24 14:08:20 -07:00
7e6fe45a4f Use notary library for trusted image fetch and signing
Add a trusted flag to force the cli to resolve a tag into a digest via the notary trust library and pull by digest.
On push the flag the trust flag will indicate the digest and size of a manifest should be signed and push to a notary server.
If a tag is given, the cli will resolve the tag into a digest and pull by digest.
After pulling, if a tag is given the cli makes a request to tag the image.

Use certificate directory for notary requests

Read certificates using same logic used by daemon for registry requests.

Catch JSON syntax errors from Notary client

When an uncaught error occurs in Notary it may show up in Docker as a JSON syntax error, causing a confusing error message to the user.
Provide a generic error when a JSON syntax error occurs.

Catch expiration errors and wrap in additional context.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ed13c3abfb242905ec012e8255dc6f26dcf122f6
Component: engine
2015-07-24 14:08:20 -07:00
e54fe5cfea Merge pull request #14925 from calavera/fix_volume_symlink_test
Remove reference to old Volumes field in inspect struct.
Upstream-commit: 9c0bb22571eca47246a210ddfdae7c7eaedb800f
Component: engine
2015-07-24 10:41:00 -04:00
fa96a081c8 Merge pull request #13771 from tiborvass/daemon-cli
New `docker daemon` command
Upstream-commit: 7674f2168642f0c9012e20db8ac27ce09ecb2983
Component: engine
2015-07-23 19:30:39 -07:00
4f814a612a Add and modify tests for legacy and new daemon invokations
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e7fc632147e40f5a243158e8378082c51a3d952e
Component: engine
2015-07-23 20:31:43 -04:00
12234c67d4 cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 96ce3a194aab2807fdd638825b9ea7cb9ba55c36
Component: engine
2015-07-23 19:44:46 -04:00
b52c35c14d Remove reference to old Volumes field in inspect struct.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: bb43bdf6c5272976215f74240ffd9db4d5fd2a3a
Component: engine
2015-07-23 16:10:31 -07:00
3dbbf38be7 Fix "docker ps" with no containers regression
The header row was not being printed when "docker ps" was invoked without containers thanks to the new format support, and we instead received a single blank line.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: f57fc03e3b39c225a05edfe217bd7616949d0dd0
Component: engine
2015-07-23 13:23:24 -07:00
6fd5a9b231 Ensure body is closed after error is checked
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 18faf6f94e0995ac3fab703d22ca82baf4a65676
Component: engine
2015-07-23 14:34:38 +02:00
fdfbc95b60 Merge pull request #14880 from Microsoft/10662-paniconremotetest
Stop SIGSEGV on test dial not reachable
Upstream-commit: d593130fdae2564434fc91de59bf5fd2f5eec05f
Component: engine
2015-07-22 23:21:12 -04:00
a35c348dcd Merge pull request #12850 from coolljt0725/add_ulimi_to_build
Add ulimit to docker build
Upstream-commit: 7e4db0a3704b3f156e6a67ce32a7fcada61fdef1
Component: engine
2015-07-22 23:11:47 -04:00
Lei
b278b668e9 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 877dbbbde8aaf6583a81d9946e4c83db8e356b1a
Component: engine
2015-07-23 10:26:06 +08:00
caa155ce8e Stop SIGSEGV on test dial not reachable
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 09b86c46b82e3d116840f3327a1f995b904ecfa4
Component: engine
2015-07-22 18:44:04 -07:00
e87491eb72 Avoid redundant HEAD requests for identical layers on push
pushV2Tag already deduplicates layers, but the scope of this
deduplication is only for a particular tag. If we are pushing all tags
in a repository, we may check layers several times. Fix this by moving
the layersSeen map from the pushV2Tag function to the v2Pusher struct.

In addition to avoiding some useless round-trips, this makes the "docker
push" output less confusing. It formerly could contain many repeated
lines like:

    124e2127157f: Image already exists
    124e2127157f: Image already exists
    ...

Add test coverage based on the "docker push" output: a hash should not
appear multiple times when pushing multiple tags.

Fixes #14873

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 810d3b2642d4a82dc186d6eff8c2e487ee624bc5
Component: engine
2015-07-22 17:54:20 -07:00
992fae5b93 Merge pull request #14613 from stefanberger/nohidevols2
Do not hide user provided network mounts [v2]
Upstream-commit: d106a2ea2ac7e78f0937798fbb7a21ff7fe1532c
Component: engine
2015-07-22 16:24:22 -04:00
ec7391b794 Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
Upstream-commit: 1c6fe58efc413b606b6b24e42584ca14be2d1ca8
Component: engine
2015-07-22 11:54:35 -07:00
b066063905 Merge pull request #14699 from estesp/docker-ps-format
Carry #10255: Docker ps format
Upstream-commit: 40b922418cd48f8b414d8e10fdd72ed2095697e1
Component: engine
2015-07-22 10:58:34 -07:00
472987774a Do not hide user provided network mounts [v2]
Prevent the docker daemon from mounting the created network files over
those provided by the user via -v command line option. This would otherwise
hide the one provide by the user.
The benefit of this is that a user can provide these network files using the
-v command line option and place them in a size-limited filesystem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Upstream-commit: 6bd389b9db38eaf4ce2b9cc0cf5024f8450504ef
Component: engine
2015-07-22 13:44:21 -04:00
e60763fbc1 ps --format: Add config.js doc, fix gofmt, add integration tests
Re-add the docs from @calavera's PR to the moved cli cmd reference docs.
Fix gofmt and vet issues from carried commits
Add integration test for using format with --no-trunc and multi-names
Fix custom_test map order dependency on expected value check
Add docs to reference/commandline/ps.md
Remove "-F" flag option from original carried PR content

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 542b58d8f7a2ff3b78a71b7d2c3145dd79f1fa97
Component: engine
2015-07-22 12:51:16 -04:00
50e8a78638 Merge pull request #14851 from bfirsh/golint-integration-cli
Golint integration-cli
Upstream-commit: 875fffdff886205d096ab348d94b5079885f17fb
Component: engine
2015-07-22 11:28:19 -04:00
6aa4de764e Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 6b3c928140193f911b73f87bb8b07f54bba5a63a
Component: engine
2015-07-22 14:03:50 +01:00
4df93cb58f Fix wrong Content-Type returned by /images/search API
/images/search was replying with Content-Type text/plain instead
of application/json.
Fix #14846

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 1a5d6a94c9e4c099354d9125ea857f6277eca0b7
Component: engine
2015-07-22 11:07:41 +02:00
2d8d0361a7 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
Upstream-commit: 50d2597e490c4636ee8cacabf34bb9ed3e21d3fc
Component: engine
2015-07-22 09:02:00 +02:00
9c4a1f92a0 Merge pull request #14804 from dave-tucker/golint_nat
golint: Fix issues in pkg/nat
Upstream-commit: ff011ededba4b51c047a9f8d27c7c5c327494c0d
Component: engine
2015-07-21 20:38:40 -07:00
8365f62c47 Merge pull request #14822 from runcom/host-config-links-on-start
Allow starting a container with an existing hostConfig which contains links
Upstream-commit: 06162fed8b12d4f43ca3d03d6956996b6c73015d
Component: engine
2015-07-21 20:06:26 -07:00
375f0f6c45 Merge pull request #14794 from HuKeping/ci
CI: use dockerCmd in integration-cli when possible
Upstream-commit: b6c5f6d0754f2fd57fbc98aec569a86f59e17545
Component: engine
2015-07-21 19:57:33 -07:00
018c7593fb CI: use dockerCmd in integration-cli when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 012b67c3ea5bff539673deaa7058036126ac1046
Component: engine
2015-07-22 17:55:41 +08:00
dfe8a9060f Merge pull request #14812 from LK4D4/fix_cgroup_parent_tests
Fix cgroup parent tests
Upstream-commit: 7a06e8527087cf9d21b4261b3ebe6575aba68ce1
Component: engine
2015-07-21 19:53:48 -07:00
5104b34c44 Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0391bf5545afef5e675138556c39e4c0e9bf91b
Component: engine
2015-07-21 20:47:31 -04:00
8f8c0a2957 Merge pull request #13171 from jlhawn/archive_copy
docker cp to and from containers
Upstream-commit: c986f85f7397c915e6b29b6dff60db678cc8b72d
Component: engine
2015-07-21 16:59:44 -07:00
89ab877e9d golint: Fix issues in pkg/nat
Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 15d01d6e6c57f4b8a39dddd2676a2d6914c62c77
Component: engine
2015-07-22 00:47:41 +01:00
8fccdeffc8 Merge pull request #14682 from duglin/Issue14621
Remove panic in nat package on invalid hostport
Upstream-commit: 36106a20cacb8f96b64da303f651bbd2160e24e3
Component: engine
2015-07-21 15:48:51 -07:00
b821d19c27 Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1c3cb2d31ea722e2c174bf78eda62fec6949fb8b
Component: engine
2015-07-21 15:33:05 -07:00
471920cd35 integration-cli: New docker cp integration tests
Adds several integration tests for `docker cp` behavior with over a dozen
tests for each of:

  container -> local
  local -> container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 418135e7eac6e664834b8a9d09d8051ec296a48f
Component: engine
2015-07-21 15:19:52 -07:00
acbea7273b Allow starting a container with an existing hostConfig which contains links
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 65121e5fce3851d7d1e8c8cd5d77dd3c9591d773
Component: engine
2015-07-21 22:10:00 +02:00
c56394846e Merge pull request #14659 from calavera/promote_volumes_experimental_to_master
Promote volume drivers from experimental to master.
Upstream-commit: 3ee15acaadc3f25c90ea2c4de2e5ab1a12d8e042
Component: engine
2015-07-21 10:39:17 -07:00
bfde6861a0 Promote volume drivers from experimental to master.
Remove volume stubs and use the experimental path as the only path.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: c4d45b6a29a91f2fb5d7a51ac36572f2a9b295c6
Component: engine
2015-07-21 09:32:44 -07:00
7f0b167fb0 Fix cgroup parent tests
After merging mounting cgroups in container this tests doing wrong
checks. Cgroup paths could be prepended by other cgroups from host.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 844fc5f77c9443b4605949219a8a3c8523249025
Component: engine
2015-07-21 08:59:17 -07:00
25af73dba8 Merge pull request #14765 from runcom/fix-dockerCmd-refactor
Refactor missed dockerCmd changes
Upstream-commit: 6c95040e3b75725cb7230d7f9a22fdf36a4bb03a
Component: engine
2015-07-21 11:53:28 -04:00
84681c30e3 Merge pull request #14609 from ewindisch/apparmor-policy
Move AppArmor policy to contrib & deb packaging
Upstream-commit: 380959dd68cd56e60a2ea93cd7f26c8d88135483
Component: engine
2015-07-21 08:48:02 -07:00
74cf202b4f Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 80d99236c1ef9d389dbaca73c1a949da16b56b42
Component: engine
2015-07-21 11:05:53 -04:00
Lei
3d41f889fe Minor fix of TestLogsStderrInStdout
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2e7daffd7b3e004b5ac64ae1744e7f44252c979d
Component: engine
2015-07-21 20:37:14 +08:00
ae51c9aa8a Add better output for TestLinksEtcHostsContentMatch to help debug #14774
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6751a49d143e329668e4bbc3214c0bb5e4d02eeb
Component: engine
2015-07-20 16:46:51 -07:00
f215de06a3 Refactor missed dockerCmd changes
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: bd328da55549dd71b3c24f27c660f1c26f277c15
Component: engine
2015-07-20 20:55:57 +02:00
42d9d20733 Merge pull request #14741 from HuKeping/ci-refactor
CI: use dockercmd when possible
Upstream-commit: fc2f90fc63014db95fd9d9052218d72d5ca1d82c
Component: engine
2015-07-20 09:49:40 -07:00
56aba58eb4 CI: use dockercmd when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 27ac154d05cf9f7aa1e9cbebe3c7769fa746de1e
Component: engine
2015-07-21 04:40:15 +08:00