Commit Graph

1728 Commits

Author SHA1 Message Date
513c7293de Merge pull request #15132 from LK4D4/improve_test
Fix message and add additional check to test
Upstream-commit: b71cf6938040fc4ae190f3e7eb24d51f756c9e11
Component: engine
2015-07-29 17:36:11 -07:00
683390e0bc Merge pull request #14980 from jlhawn/build_tag_resolved_digests
[api/client] Tag resolved digest from Dockerfile
Upstream-commit: d94aeb28765635970e7cac605b85785212855438
Component: engine
2015-07-29 16:52:14 -07:00
1bd0671e56 Merge pull request #15098 from calavera/backwards_compat_kill_error
Keep backwards compatibility in kill api.
Upstream-commit: 4a71323ec3c00be48e3539a1da0444972f22c355
Component: engine
2015-07-29 16:42:36 -07:00
36993f8dbd Fix the proc integration test & include missing AA profile
Integration tests were failing due to proc filter behavior
changes with new apparmor policies.

Also include the missing docker-unconfined policy resolving
potential startup errors. This policy is complain-only so
it should behave identically to the standard unconfined policy,
but will not apply system path-based policies within containers.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 5832715052e9e165cc40a5ac8178fa62685985aa
Component: engine
2015-07-29 17:08:51 -04:00
4e9957ee2d Merge pull request #15133 from dmcgowan/notary-fix-test-date
Skip notary tests which update system clock
Upstream-commit: 0f85fadb4ec1aa3d0270351fc72fa9a70cffd3b9
Component: engine
2015-07-29 12:51:05 -07:00
4c1bdea55d Skip notary tests which update system clock
Currently some notary tests change the system clock to check for expiration.
Skip these tests until the code can be refactored to not rely on updating the system clock.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bf3c1e6a3afc951e41643b8d55d4ac25fa9cb06d
Component: engine
2015-07-29 12:09:40 -07:00
6f4ce090eb Fix message and add additional check to TestBuildContainerWithCgroupParent
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 0d09439acea2ee1886d301c03e5e33abf8735896
Component: engine
2015-07-29 11:46:33 -07:00
7b7157591c Merge pull request #15099 from ewindisch/apparmor-restore-en
Restore AppArmor generation + fixes
Upstream-commit: d7661cb48b93978b4b30d2c60f3201d685af7f95
Component: engine
2015-07-29 09:36:59 -07:00
67bf5ba305 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
2015-07-28 22:31:01 -07:00
e057b33e06 [api/client] Tag resolved digest from Dockerfile
Builds where the base images have been resolved to trusted digest
references will now be tagged with the original tag reference from
the Dockerfile on a successful build.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: bb2e6c72d2fb3f1b64755bdf6d6269dbc6767f87
Component: engine
2015-07-28 17:54:48 -07:00
e9b83a5a26 Restore AppArmor profile generation
Will attempt to load profiles automatically. If loading fails
but the profiles are already loaded, execution will continue.

A hard failure will only occur if Docker cannot load
the profiles *and* they have not already been loaded via
some other means.

Also introduces documentation for AppArmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 3edc88f76df6a3bc9d887de8157ec71730c9057a
Component: engine
2015-07-28 17:45:51 -04:00
26753acfcd Keep backwards compatibility in kill api.
Return an error when the container is stopped only in api versions
equal or greater than 1.20 (docker 1.8).

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 621e3d8587bbee86b4e36d0b7822662bfbedd76c
Component: engine
2015-07-28 12:25:36 -07:00
6f7ccf2956 Skip DockerSuite.TestExecResizeImmediatelyAfterExecStart on lxc
Signed-off-by: Chris Seto <chriskseto@gmail.com>
Upstream-commit: 83cb28857551d0077b3877d1de1c3c44a39da705
Component: engine
2015-07-27 19:20:15 -04:00
e075bafeec Merge pull request #15039 from jlhawn/fix_build_context_is_symlink
[api/client] Fix build when context dir is symlink
Upstream-commit: bdc55be9b49bd4cdcc9373e2eb847b133532cedc
Component: engine
2015-07-27 15:11:36 -07:00
c3325b7678 Merge pull request #15045 from cpuguy83/fix_dockercmdwitherror
Don't pass check.C to dockerCmdWithError
Upstream-commit: 8c9cd0418d1baa5ceddec58e3a4873607e9cafcd
Component: engine
2015-07-27 16:04:16 -04:00
a5d4f063b0 [api/client] Fix build when context dir is symlink
Symbolic links in the context directory path are now evaluated.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 01d570ad30a794f2736b679700af91625e61bc85
Component: engine
2015-07-27 12:01:13 -07:00
6f5eddf659 Merge pull request #15044 from jlhawn/fix_15042
[integration-cli] fix windows build test cases
Upstream-commit: d0215376f838c73b9684f34584e63908fdeca281
Component: engine
2015-07-27 11:47:56 -07:00
6e14356132 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 693ba98cb9118bf15caaabc69ca281c0ce604226
Component: engine
2015-07-27 14:33:32 -04:00
083f0a374e [integration-cli] fix windows build test cases
Use the same IP as the DOCKER_HOST when making a remote file server.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: d06ffd0a5f5d55dacc369fc6560316e9f17e2cac
Component: engine
2015-07-27 11:30:38 -07:00
2c72388c36 Merge pull request #15026 from duglin/Issue14837
Add a test for using -f w/git repo on build
Upstream-commit: afac39d3082febd5c0270f7d19cb6c7512002f7d
Component: engine
2015-07-27 10:55:47 -07:00
1b5a1d2d53 Merge pull request #14547 from duglin/ErrDeadExec
Return 404 on exec-inspect when container is dead but exec is still around
Upstream-commit: 4dbdd98b4142dbda1c6028c17a9a0d6dd8cdce04
Component: engine
2015-07-27 10:46:32 -07:00
6356a946a6 Merge pull request #14118 from mountkin/fix-rmi-force
raise an error if rmi -f with multiple tags and running container
Upstream-commit: 33bd41df94a3fa81e3b011602008a31a57a5ca68
Component: engine
2015-07-27 10:42:07 -07:00
6f66e6db3b Merge pull request #14899 from mountkin/fix-exec-resize-panic
fix the panic caused by resizing a starting exec
Upstream-commit: 70842ea942326b2a3be3b504a7f5038ba68f07f1
Component: engine
2015-07-27 10:27:29 -07:00
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
a8c27a01ce Adda test for using -f w/git repo on build
https://github.com/docker/docker/pull/14546 actually fixed issue #14837
but I don't see a new test to ensure we don't regress. So this PR adds
a test and then we can close #14837.

Closes #14837

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d8835404400d46dfe475fa3bad9f1b9fb8396bef
Component: engine
2015-07-27 07:49:42 -07: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
42a4333b5d raise an error if rmi -f with multiple tags and running container
Fixes https://github.com/docker/docker/issues/14116

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 9f7698a63731cd1000c664894e7f48942be16821
Component: engine
2015-07-24 20:44:13 +08:00
a1d7796250 fix the panic caused by resizing a starting exec
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: ba5e0980527d3477cb85925e07eecb28dfe50e08
Component: engine
2015-07-24 20:43:07 +08: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