Commit Graph

990 Commits

Author SHA1 Message Date
90fc12f567 Merge pull request #10568 from LK4D4/logging_drivers
Logging drivers
Upstream-commit: 1ff5a91007f01d2d61a7b2066db2e164085f0d1b
Component: engine
2015-03-17 09:45:58 -07:00
e296e8dc09 Merge pull request #11369 from coolljt0725/fix_link
Fix --link to a container which net mode is container
Upstream-commit: cb77ad4757947adcff7bf4cd95969e75a7018614
Component: engine
2015-03-17 08:36:33 -07:00
2b10322f3f Merge pull request #11436 from sunyuan3/m1
verify MaximumRetryCount for container restart policy
Upstream-commit: aba193499e06341428b15f99149c00682507bbb2
Component: engine
2015-03-17 08:26:22 -07:00
9e124c2aad Fix --link to a container which net mode is container mode
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 82e2e1a11af60a41100e2ced24f23cf2872e5604
Component: engine
2015-03-17 07:50:12 -07:00
d6d379e87a Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: a2b0c9778feac970524b98ef7a91b5528fdeb9d5
Component: engine
2015-03-17 10:10:42 +00:00
3f595d22d6 verify MaximumRetryCount for container restart policy
Signed-off-by: s00318865 <sunyuan3@huawei.com>
Upstream-commit: 173642c8660adb39619ecfe725bd44b984d4c627
Component: engine
2015-03-17 13:20:25 +08:00
5f00f97ea0 Merge pull request #9882 from ibuildthecloud/labels
Proposal: One Meta Data to Rule Them All => Labels
Upstream-commit: b6ac111abfbed628a80b67f0b092a248083b354c
Component: engine
2015-03-16 20:20:05 -07:00
bd0b1983fb Merge pull request #11343 from hqhq/hq_fix_panic_error
fix panic error when docker stats a stopped container
Upstream-commit: a2fcae41efdc52087d733d962b9ee3ef37a81450
Component: engine
2015-03-16 15:16:03 -07:00
526e8c6e31 Merge pull request #10591 from duglin/ErrUnknownCmd
Generate an error on unknown Dockerfile instruction
Upstream-commit: 085054db9d8850a7d2c8658bb9a7fdacf7a3ceb8
Component: engine
2015-03-16 17:47:28 -04:00
194d87a1e1 Merge pull request #10792 from larsks/bug/10781
fix various problems with iptables.Exists
Upstream-commit: 1705ded1d208673ebd1a5fcc61a324da5f30411d
Component: engine
2015-03-16 17:39:36 -04:00
eda2d7f6c9 Merge pull request #11419 from dmcgowan/fix-test-pull-verified
Fix test pull verified
Upstream-commit: 2550c306eb737c75f331454fa372bc5700b566f4
Component: engine
2015-03-16 14:23:59 -07:00
2781401caa fix various problems with iptables.Exists
This modifies iptables.Exists so that it must be called with an explicit
table and chain.  This allows us (a) to generate an appropriate command
line for "iptables -C", which was not previously possible, and (b) it
allows us to limit our strings.Contains() search to just the table and
chain in question, preventing erroneous matches against unrelated rules.

Resolves #10781

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
Upstream-commit: 3559b4177e611920d87c4dae607c641efb645783
Component: engine
2015-03-16 17:14:45 -04:00
f32b25fee3 Fix test pull verified
Update pull code to consider any layer download or new tag as an update.
Update hello-world frozen image to be explicitly tagged as frozen, to not interfere with pull tests.  The hello-world is used by pull tests because of its small size and there is no other official image with such a size.

fixes #11383

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 636037c3637eb1d09cc469cebe39ffb915bb0aa9
Component: engine
2015-03-16 12:22:00 -07:00
45269e9133 fix panic error when docker stats a stopped container
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8dc5791f7302aea0734a26dc1f54d96b04771b8f
Component: engine
2015-03-16 19:55:34 +08:00
ed5523443d Merge pull request #10298 from hqhq/hq_move_resource_to_hostconfig
move resource options from Config to hostConfig
Upstream-commit: bc7d1d6ef307b05b0951f5c884620a87c5ac8f7d
Component: engine
2015-03-15 17:30:46 -07:00
0a3eeb1d23 Generate an error on unknown Dockerfile instruction
Instead of just printing a warning and going on, this will generate
an error and stop processing.

This used to be part of #10561 but I decided it might need its own
independent discussion/PR as to not derail #10561.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8a5b50d65dae2d0607e046c57241dd6b46b65c6a
Component: engine
2015-03-13 16:08:34 -07:00
9010aeaadf Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: bdf3a0295d401624483d4103fdaacc2bea1c7d46
Component: engine
2015-03-13 15:02:09 -07:00
1f05c24e96 Tests for --log-driver options
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: dd6d2cd6603af51a49e41048511038ed8770d32b
Component: engine
2015-03-13 12:13:37 -07:00
8370215971 Add more tests for labels on containers
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 5de1298f41ad0ab0b13c839854d6b2a5354294b8
Component: engine
2015-03-13 10:02:04 -07:00
58d45ba275 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: abb5e9a0777469e64fe2c7ecfa66ea01083d2071
Component: engine
2015-03-13 10:02:04 -07:00
51b13a7774 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: cdfdfbfb6223fdd5b319942d412caac6bc09cdeb
Component: engine
2015-03-13 09:47:09 -07:00
e70ef80162 correct some daemon spelling mistakes
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 906974b185b431a8c493479f748677f3c0bc4ca3
Component: engine
2015-03-13 05:14:56 -04:00
7f7a47b98e Merge pull request #11265 from duglin/ScratchSHfix
Fix builder when num of RUN args is 1
Upstream-commit: 565cff84b1ae13e21fa74af83e58d29bafbca47a
Component: engine
2015-03-12 09:30:56 -05:00
182d2d03b5 correct a spelling mistake
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: a02256577ab0806f004e41fd94aaaed52d1aff97
Component: engine
2015-03-12 09:22:51 -04:00
20b7c132ab Merge pull request #11278 from ahmetalpbalkan/win-cli/fakeGIT
integ-cli: use httpserver container for fakeGIT
Upstream-commit: 52f6da223839a5ac1fc003b259b74f6a02fc2858
Component: engine
2015-03-11 18:19:11 -07:00
282d3dadfd Merge pull request #11331 from jfrazelle/update-logrus
Update logrus to 0.6.6
Upstream-commit: 5494432f917eb0f6e4cf73deed366f6830ec64ec
Component: engine
2015-03-11 16:18:22 -07:00
54029ad909 Merge pull request #11310 from ahmetalpbalkan/win-cli/ping-icmp
integ-cli: remove ICMP dependency from test, use nslookup
Upstream-commit: d6a6c7d4d9ef08d218cad6dd9ed72b3d2f40060c
Component: engine
2015-03-11 17:53:50 -04:00
4ae0ae0aee integ-cli: remove ICMP dependency from test, use nslookup
As we started running CI machines on Azure cloud and Azure
doesn't have ICMP stack implemented by replacing
`ping 8.8.8.8` with `nslookup google.com`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 004ac85aa25f08e350465140ee7404ad31602d75
Component: engine
2015-03-11 14:27:11 -07:00
31b9b2a976 Merge pull request #11326 from cpuguy83/11315_rename_w_daemon_restart
Persist container to disk after rename
Upstream-commit: c6321931d234a190bf0696d0ab5711425c83480c
Component: engine
2015-03-11 13:44:13 -07:00
e7e0b4ff1a Persist container to disk after rename
Fixes #11315

After rename occured the graphdb was updated but the container struct
was never commited back to disk, so on daemon restart it loads the old
name again.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c5c72cf151b21482b2f27417322342c6d781108c
Component: engine
2015-03-11 12:39:31 -07:00
e4aa3231a3 Update logrus to 0.6.6
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 89e2e5fc55620634df3f2c9403594b0f701b0c5c
Component: engine
2015-03-11 11:29:13 -07:00
76ab368c1d integ-cli: fix clock skew against remote test daemon
This fixes the `docker events`-related tests as they have been
failing due to clock skew between CI machine and test daemon on
some other machine (even 1-2 seconds of diff causes races as
we pass local time to --since/--until).

If we're running in same host, we keep using time.Now(), otherwise
we read the system time of the daemon from `/info` endpoint.

Fixes pretty much all events-related tests on windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: e424c54d9c4030dc3290701e8e76add372e09e08
Component: engine
2015-03-11 10:28:56 -07:00
2c409e6dd8 Fix builder when num of RUN args is 1
FROM scratch
ADD echo /
RUN [ "echo" ]

will die with
  exec: "/bin/sh": stat /bin/sh: no such file or directory

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 645f8a32df3b5b22e5e194664a9f0733709714c9
Component: engine
2015-03-11 07:30:44 -07:00
8ea0c3c94e Add checking trailing space for all lines of the help output
Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
Upstream-commit: 491b63e0daa9103cf9471c03c4b41026f6955323
Component: engine
2015-03-11 21:24:30 +08:00
362dc0b239 Normalize the log for docker subcommand usage,
delete unecessary blank after "[OPTIONS] "
and add a blank to the log between options and signature.

To make the code style consistency.

Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
Upstream-commit: 2b051bcbda06ec48287e75da506bacf95be2b652
Component: engine
2015-03-11 18:58:32 +08:00
8855da6111 Add the check for suffix of option in each line of help, to make sure no extra space in it
Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
Upstream-commit: f63a29ddeee62c8e4fcb1cf8eaf84aff305380c0
Component: engine
2015-03-11 18:46:01 +08:00
546ad5a411 integ-cli: use httpserver container for fakeGIT
This change enables `fakeGIT()` to use the new `fakeStorage`
server which is automatically starting a container on the remote test
daemon machine using the git repo directory (when requested).

Fixes the following tests:

- `TestBuildApiLowerDockerfile`
- `TestBuildApiBuildGitWithF`
- `TestBuildApiDoubleDockerfile` (skipped on windows: NTFS case-insensitive)
- `TestBuildFromGIT` (still needs local server)

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 44ffb199d03f0d63a2c9ad05e9fd03a6a08c594d
Component: engine
2015-03-10 22:48:35 -07:00
0cbd226ff4 Merge pull request #10663 from brahmaroutu/events_filterbyname_10645
filter events by container name
Upstream-commit: dd6f76a76cb4e12d74fcd974ebd6a9c4f8d43751
Component: engine
2015-03-10 21:16:39 -07:00
71f67ca560 move resources from Config to HostConfig
Cgroup resources are host dependent, they should be in hostConfig.

For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
  {
      "Hostname": "",
      ...
      "HostConfig": {
	  "CpuShares": 512,
          "Memory": 314572800,
          ...
      }
  }

As we will add CpusetMems, CpusetCpus is definitely a better name, but some
users are already using Cpuset in their http APIs, we also make it compatible.

The main idea is keep using Cpuset in Config Struct, and make it has the same
value as CpusetCpus, but not always, some scenarios:
 - Users use --cpuset in docker command, it can setup cpuset.cpus and can
   get Cpuset field from docker inspect or other http API which will get
   config info.
 - Users use --cpuset-cpus in docker command, ditto.
 - Users use Cpuset field in their http APIs, ditto.
 - Users use CpusetCpus field in their http APIs, they won't get Cpuset field
   in Config info, because by then, they should already know what happens
   to Cpuset.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 837eec064d2d40a4d86acbc6f47fada8263e0d4c
Component: engine
2015-03-11 09:31:18 +08:00
993f8d5799 Merge pull request #11235 from coolljt0725/fix_default_restart_name
Set default restart policy name to `no` Closes #10874
Upstream-commit: 7e47bb6effd1f076a78827543c4b4ce399c0ad1b
Component: engine
2015-03-10 12:12:40 -07:00
e6f3051dc3 Merge pull request #11288 from estesp/warn-on-localhost-dns
Add warning for --dns flag set to localhost addresses.
Upstream-commit: 8be1671f451079b3567689c19ccc310266d026cd
Component: engine
2015-03-10 12:03:46 -07:00
53af0dd72f Add warning for --dns flag set to localhost addresses.
We should warn users who use the `--dns` command line option to point
DNS to a localhost address, either IPv4 or IPv6.  Unless they have
specifically set up the container as a DNS server or are using
--net=host (which is why this should be allowed, but warned on because
those are pretty unique cases) a localhost address as a resolver will
not reach what they might expect (e.g. expecting it will hit localhost
on the Docker daemon/host).

Added a test for the message, and fixed up tests to separate stdout and
stderr that were using `--dns=127.0.0.1` to test the options.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: afa92a9af0f1a77ef25aab73b11aa855a1823666
Component: engine
2015-03-10 14:43:17 -04:00
36b60a9555 Merge pull request #11282 from duglin/FixAPITestCode
Fixup a test for -f processing
Upstream-commit: 1b1cc100f2859c937ddad9adfe6059bb48e514a1
Component: engine
2015-03-10 12:10:08 -04:00
d2615972c0 Merge pull request #11143 from dmcgowan/graph-v2-push-cleanup
Cleanup v2 push logic
Upstream-commit: eb21eb95e592951d0f80ced9273fd025959bb350
Component: engine
2015-03-10 11:56:02 -04:00
02ceac919e Merge pull request #11208 from LK4D4/new_libcontainer_api
New libcontainer api
Upstream-commit: 2fb89b2e2ca1043abf8d4c02532ce42135efe6f6
Component: engine
2015-03-10 07:50:19 -07:00
4a7bad6471 Fixup a test for -f processing
Thanks to @ahmetalpbalkan for noticing... we had an old check in this
testcase that no longer applied (due to stuff being removing recently).
However, while in there I added a check to make sure that the file referenced
by the query parameter isn't used at all.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a853f8e4687adb78c0e63019caae32b216cce925
Component: engine
2015-03-10 05:47:12 -07:00
0199092cfa Set default restart policy name to 'no' Closes #10874
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 311a600f1912c0d2a30becffdecde6026ada2624
Component: engine
2015-03-10 10:09:12 +08:00
91448d8573 Cleanup v2 push logic
Manifest is now generated during a v2 push, not relying on previously generated hashes. When pushing a layer, the hash is directly calculated from the tar contents which will be pushed. Computing the hash on push ensures that the hash contents always match what is seen by the registry. This also mitigates issues with tarsum differences and permits using pure SHA digests.
Additionally the new manifest function is moved to the unit tests since it is no longer called outside the tests.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d172f1253a6a277dce71cd59b0d87119f3ed282e
Component: engine
2015-03-09 18:33:15 -07:00
9863597201 Use server.URL() instead of server.URL
Old way now returns the go type instead of the value

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 40c8e78757a75a9e251223f563fc5adb2bc9bf99
Component: engine
2015-03-09 17:00:45 -07:00
c53e223228 Merge pull request #11159 from duglin/LastModifiedTest
Add an HTTP Last-Modified header testcase
Upstream-commit: feb02a2bbf9b4b4eb8f68bcec652ac687195f462
Component: engine
2015-03-09 19:22:27 -04:00