Граф коммитов

1701 Коммитов

Автор SHA1 Сообщение Дата
David Calavera c451d597f2 Merge pull request #15028 from vbatts/typo
api/client/build: typo in error
2015-07-27 10:13:05 -07:00
David Calavera e89aec0dfb Merge pull request #15010 from runcom/14947-fix-inspect-time-RFC3339Nano
Format times in inspect command with a template as RFC3339Nano
2015-07-27 10:08:21 -07:00
Alexander Morozov ec8173b517 Merge pull request #14917 from srust/14915-empty-hostconfig-on-create
Check for nil before using HostConfig to adjustCpuShares
2015-07-27 09:38:32 -07:00
Vincent Batts 7b4e6fc47b *: s/direcotry/directory/g typo
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-07-27 11:29:28 -04:00
Stephen Rust c358a4cd35 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>
2015-07-26 20:33:04 -04:00
Antonio Murdaca c9207bc0aa 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>
2015-07-26 15:25:08 +02:00
Chris Seto 04f76b67c9 Fix go vet errors
Signed-off-by: Chris Seto <chriskseto@gmail.com>
2015-07-25 17:00:10 -04:00
Alexander Morozov 6b12d37ced Merge pull request #14941 from hqhq/hq_cli_remove_cleanup
Remove unnecessary container cleanup in integration-cli
2015-07-24 20:38:15 -07:00
Tibor Vass afb831d35e Merge pull request #14979 from runcom/fix-flacky-TestRunNonRootUserResolvName
Fix TestRunNonRootUserResolvName flackiness
2015-07-24 21:50:44 -04:00
Antonio Murdaca 30d4c70d28 Fix TestRunNonRootUserResolvName flackiness
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-25 02:45:17 +02:00
Arnaud Porterie 4f5b677fd9 Merge pull request #14546 from dmcgowan/trusted-notary-integration
Notary integration
2015-07-24 17:44:14 -07:00
Derek McGowan 259cadb0b1 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)
2015-07-24 16:31:18 -07:00
Diogo Monica 3e90b12d42 Added tests for expired snapshots and timestamps
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-24 16:31:18 -07:00
Nathan McCauley 268fa5af47 Add tests simulating an evil server
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-24 16:31:18 -07:00
Derek McGowan 871d2b96ed 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)
2015-07-24 16:31:12 -07:00
Jessica Frazelle 0a5b8c40c0 ignore certain tests on lxc driver
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-24 16:10:59 -07:00
Zhang Kun 0547b5fb2a #14474 skip DockerSuite.TestRunCapAddCHOWN on lxc
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-07-24 15:16:07 -07:00
Diogo Monica eeb6d0a71b Add test for incorrect nonroot passphrase
Fix failing tests for create, push, and pull

Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-24 14:08:20 -07:00
Nathan McCauley 1406cb35fd Add trust tests for Docker create, run, push, and pull
Created date util function

Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-24 14:08:20 -07:00
Diogo Monica 356b07c896 Add more integration tests for trusted push and pull
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-24 14:08:20 -07:00
Derek McGowan 58a1de9b59 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)
2015-07-24 14:08:20 -07:00
Derek McGowan ed13c3abfb 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)
2015-07-24 14:08:20 -07:00
Tibor Vass 9c0bb22571 Merge pull request #14925 from calavera/fix_volume_symlink_test
Remove reference to old Volumes field in inspect struct.
2015-07-24 10:41:00 -04:00
Qiang Huang bcc0968a2c Remove unnecessary container cleanup in integration-cli
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-24 14:48:26 +08:00
Jessie Frazelle 7674f21686 Merge pull request #13771 from tiborvass/daemon-cli
New `docker daemon` command
2015-07-23 19:30:39 -07:00
Shishir Mahajan e7fc632147 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>
2015-07-23 20:31:43 -04:00
Tibor Vass 96ce3a194a 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>
2015-07-23 19:44:46 -04:00
David Calavera bb43bdf6c5 Remove reference to old Volumes field in inspect struct.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-23 16:10:31 -07:00
Tianon Gravi f57fc03e3b 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>
2015-07-23 13:23:24 -07:00
Antonio Murdaca 18faf6f94e Ensure body is closed after error is checked
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-23 14:34:38 +02:00
Phil Estes d593130fda Merge pull request #14880 from Microsoft/10662-paniconremotetest
Stop SIGSEGV on test dial not reachable
2015-07-22 23:21:12 -04:00
Phil Estes 7e4db0a370 Merge pull request #12850 from coolljt0725/add_ulimi_to_build
Add ulimit to docker build
2015-07-22 23:11:47 -04:00
Lei 877dbbbde8 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-23 10:26:06 +08:00
John Howard 09b86c46b8 Stop SIGSEGV on test dial not reachable
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-22 18:44:04 -07:00
Aaron Lehmann 810d3b2642 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>
2015-07-22 17:54:20 -07:00
Brian Goff d106a2ea2a Merge pull request #14613 from stefanberger/nohidevols2
Do not hide user provided network mounts [v2]
2015-07-22 16:24:22 -04:00
David Calavera 1c6fe58efc Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
2015-07-22 11:54:35 -07:00
David Calavera 40b922418c Merge pull request #14699 from estesp/docker-ps-format
Carry #10255: Docker ps format
2015-07-22 10:58:34 -07:00
Stefan Berger 6bd389b9db 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>
2015-07-22 13:44:21 -04:00
Phil Estes 542b58d8f7 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)
2015-07-22 12:51:16 -04:00
Tibor Vass 875fffdff8 Merge pull request #14851 from bfirsh/golint-integration-cli
Golint integration-cli
2015-07-22 11:28:19 -04:00
Ben Firshman 6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
Antonio Murdaca 1a5d6a94c9 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>
2015-07-22 11:07:41 +02:00
Sebastiaan van Stijn 50d2597e49 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
Jessie Frazelle ff011ededb Merge pull request #14804 from dave-tucker/golint_nat
golint: Fix issues in pkg/nat
2015-07-21 20:38:40 -07:00
Jessie Frazelle 06162fed8b Merge pull request #14822 from runcom/host-config-links-on-start
Allow starting a container with an existing hostConfig which contains links
2015-07-21 20:06:26 -07:00
Jessie Frazelle b6c5f6d075 Merge pull request #14794 from HuKeping/ci
CI: use dockerCmd in integration-cli when possible
2015-07-21 19:57:33 -07:00
Hu Keping 012b67c3ea CI: use dockerCmd in integration-cli when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-07-22 17:55:41 +08:00
Jessie Frazelle 7a06e85270 Merge pull request #14812 from LK4D4/fix_cgroup_parent_tests
Fix cgroup parent tests
2015-07-21 19:53:48 -07:00
Brian Goff c0391bf554 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>
2015-07-21 20:47:31 -04:00