Commit Graph

1701 Commits

Author SHA1 Message Date
ae24227f7b Merge pull request #15028 from vbatts/typo
api/client/build: typo in error
Upstream-commit: c451d597f2abef42bd26212d18844a03c3773818
Component: engine
2015-07-27 10:13:05 -07:00
704cf2735f Merge pull request #15010 from runcom/14947-fix-inspect-time-RFC3339Nano
Format times in inspect command with a template as RFC3339Nano
Upstream-commit: e89aec0dfb2dd4a5decc11ea008f3ab179e8d5f8
Component: engine
2015-07-27 10:08:21 -07:00
af395c292f Merge pull request #14917 from srust/14915-empty-hostconfig-on-create
Check for nil before using HostConfig to adjustCpuShares
Upstream-commit: ec8173b5171b7f7cd4816453bdf714fec8d22353
Component: engine
2015-07-27 09:38:32 -07:00
7eed677896 *: s/direcotry/directory/g typo
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7b4e6fc47b5b4b25f74f12419005098478e16ce7
Component: engine
2015-07-27 11:29:28 -04:00
dec1a0e3c4 Check for nil before using HostConfig to adjustCpuShares
Fix #14915. Add unit test for #14915.
Thanks @runcom for the test case: when the client calls 1.18 api
version w/o hostconfig it results in a nil pointer dereference.

Signed-off-by: Stephen Rust <srust@blockbridge.com>
Upstream-commit: c358a4cd3597ac330674c9d93b6038e8f455c8f7
Component: engine
2015-07-26 20:33:04 -04:00
0fccf757d0 Format times in inspect command with a template as RFC3339Nano
In 1.6.2 we were decoding inspect API response into interface{}.
time.Time fields were JSON encoded as RFC3339Nano in the response
and when decoded into interface{} they were just strings so the inspect
template treated them as just strings.
From 1.7 we are decoding into types.ContainerJSON and when the template
gets executed it now gets a time.Time and it's formatted as
2015-07-22 05:02:38.091530369 +0000 UTC.
This patch brings back the old behavior by typing time.Time fields
as string so they gets formatted as they were encoded in JSON -- RCF3339Nano

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: c9207bc0aa57745876a3422d2cbc290be7c53da8
Component: engine
2015-07-26 15:25:08 +02:00
861b01ab9e Fix go vet errors
Signed-off-by: Chris Seto <chriskseto@gmail.com>
Upstream-commit: 04f76b67c9f0a4559ef91e24873f51b81c81b957
Component: engine
2015-07-25 17:00:10 -04:00
7a78f67eef Merge pull request #14941 from hqhq/hq_cli_remove_cleanup
Remove unnecessary container cleanup in integration-cli
Upstream-commit: 6b12d37cedc3c4c9287d1dcdb1fc831f46e49ee6
Component: engine
2015-07-24 20:38:15 -07:00
abb442b01d Merge pull request #14979 from runcom/fix-flacky-TestRunNonRootUserResolvName
Fix TestRunNonRootUserResolvName flackiness
Upstream-commit: afb831d35e62139c9e7a214a471c3dd956076223
Component: engine
2015-07-24 21:50:44 -04:00
6a640c48bd Fix TestRunNonRootUserResolvName flackiness
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 30d4c70d282248ac218c6c505d5a316e5cc9ac01
Component: engine
2015-07-25 02:45:17 +02:00
4f2862dc8f Merge pull request #14546 from dmcgowan/trusted-notary-integration
Notary integration
Upstream-commit: 4f5b677fd9808b34382061c458e13d3930516889
Component: engine
2015-07-24 17:44:14 -07:00
99a373ceb8 Rename to flags and environment variables to content trust
Update help line to allow 90 characters instead of 80

The trust flag pushes out the help description column wider, requiring more room to display help messages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 259cadb0b19a9049302e78fec529b0105efabb1d
Component: engine
2015-07-24 16:31:18 -07:00
e5887c6923 Added tests for expired snapshots and timestamps
Signed-off-by: Diogo Monica <diogo@docker.com>
Upstream-commit: 3e90b12d42f6f937639edafa4b2ddc12badf8895
Component: engine
2015-07-24 16:31:18 -07:00
937cba2db1 Add tests simulating an evil server
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
Upstream-commit: 268fa5af4768f7b1df32501d5f7ba0daba2c2da1
Component: engine
2015-07-24 16:31:18 -07:00
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
5944bec2a8 ignore certain tests on lxc driver
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 0a5b8c40c088c90abb8e3410b92758ed603836d9
Component: engine
2015-07-24 16:10:59 -07:00
9180bba544 #14474 skip DockerSuite.TestRunCapAddCHOWN on lxc
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 0547b5fb2ac98d67eea3ed56f4afae87dff3079c
Component: engine
2015-07-24 15:16:07 -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
0e9fea3c70 Remove unnecessary container cleanup in integration-cli
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: bcc0968a2c9b5feef2c09b097c461a80b50ac19a
Component: engine
2015-07-24 14:48:26 +08: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