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

1339 Коммитов

Автор SHA1 Сообщение Дата
Doug Davis 006c066b6c Fix RUN err msg (again)
Previous fix used %q which incorrectly go-escaped things. For example:

```
RUN echoo A \& B	C
```
would result in the user seeing:
```
INFO[0000] The command '/bin/sh -c echoo A \\& B\tC' returned a non-zero code: 127
```
Note the double-\ and the \t instead of a tab character

The testcase had to double escape things due to logrus getting in the way
but I'm going to fix that in another PR because its a change to the UX.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-09 09:22:30 -07:00
Ma Shimiao dccb8b5c33 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-05-09 10:02:46 +08:00
Brian Goff af9dac9627 Merge pull request #13069 from runcom/dry-run-test
API tests - Container create with Hostname, Domainname and Network
2015-05-07 22:07:41 -04:00
Jessica Frazelle 52118df432 fix lxc because it doesnt have the hardened libcontainer stuff
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-07 17:40:37 -07:00
Jessie Frazelle 6b6a26c769 Merge pull request #11516 from coolljt0725/add_show_error_set_some_flag_in_container_netmode
add support --net=container with --mac-address, --add-host error out
2015-05-07 17:13:32 -07:00
Jessie Frazelle de32f5c431 Merge pull request #11802 from hqhq/hq_add_blkio_weight
add blkio.weight support
2015-05-07 17:10:39 -07:00
Jessie Frazelle e03ac8d5b9 Merge pull request #12175 from dqminh/fix-allocate-port
#12148: sort ports mapping before allocating
2015-05-07 17:04:20 -07:00
Jessie Frazelle d0bc0153c6 Merge pull request #12278 from duglin/12267-Wildcards
Fix for Daemon crashing when wildcards are used for COPY/ADD
2015-05-07 17:01:16 -07:00
Jessie Frazelle 0ed2013590 Merge pull request #12952 from sunyuan3/trunc
Verify the no-trunc option for the search operation
2015-05-07 16:52:46 -07:00
Jessie Frazelle 372977148d Merge pull request #12961 from hqhq/hq_remove_err_out
a few cleanups for client output
2015-05-07 16:51:56 -07:00
Jessie Frazelle b4e8942367 Merge pull request #13076 from LK4D4/fix_api_daemon_order
Fix api servers creation and daemon start order
2015-05-07 16:23:44 -07:00
Jessica Frazelle 2c2f6fd272 bump version back to 1.7.0-dev
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-07 15:42:36 -07:00
Alexander Morozov 08230703fd Fix api servers creation and daemon start order
* daemon creation wasn't parallel to request buffering
* it was possible that empty volume will be created in
  /var/run/docker.sock by some container

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-07 15:38:02 -07:00
Michael Crosby f25bbedc85 Allow libcontainer to eval symlink destination
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add tests for mounting into /proc and /sys

These two locations should be prohibited from mounting volumes into
those destinations.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-07 14:43:39 -07:00
Michael Crosby a7a51306b1 Mask reads from timer_stats and latency_stats
These files in /proc should not be able to be read as well
as written to.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-07 14:42:23 -07:00
Michael Crosby 27ae108b4e Mount RO for timer_stats and latency_stats in proc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-07 14:42:23 -07:00
Michael Crosby d87da59c79 Prevent write access to /proc/asound
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	integration-cli/docker_cli_run_test.go
2015-05-07 14:42:23 -07:00
Jessie Frazelle 74bfa36753 Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
2015-05-07 14:01:16 -07:00
Rajdeep Dua 80d73c838a Test Cases for API - Container create with Hostname, DomainName and NetworkMode
Signed-off-by: Rajdeep Dua <dua_rajdeep@yahoo.com>
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-07 21:03:39 +02:00
David Calavera d78755d159 Merge pull request #12822 from brahmaroutu/container_stop_api
restapi stop fails if ?t=int not present
2015-05-07 09:38:59 -07:00
Srini Brahmaroutu 68e9c07850 Restapi for stop fails if ?t=int not present
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-05-07 15:43:50 +00:00
Qiang Huang f133f11a7d add blkio.weight support
We can use this to control block IO weight of a container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-07 11:55:58 +08:00
Antonio Murdaca 74121a4211 Do not check and return strconv.Atoi error in api container restart, regression
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-07 01:49:16 +02:00
Alexander Morozov 4b4adae41c Merge pull request #13033 from icecrime/12715_carry
Logs with follow=1 immediately send HTTP response
2015-05-06 15:42:48 -07:00
Anthony Baire 589de35651 Logs with follow=1 immediately send HTTP response
Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-06 14:39:45 -07:00
Jessie Frazelle 10f4bf514d Merge pull request #12878 from cpuguy83/move_chunked_encoding_test_to_from_integration
Move ChunkedEncoding from integration
2015-05-06 13:59:13 -07:00
Brian Goff f9b20ad9e4 Merge pull request #12999 from duglin/BadRUNerrMsg
Fix RUN's error msg when it fails
2015-05-06 15:49:24 -04:00
Alexander Morozov 71c1a7ea7f Merge pull request #13017 from cpuguy83/12859_fix_lxc_wait_exitcodes
Fix LXC stop signals
2015-05-06 11:21:44 -07:00
Brian Goff 7c574b9e9d Move ChunkedEncoding from integration
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-05-06 13:00:17 -04:00
Brian Goff d2c4ee37c6 Fix LXC stop signals
`lxc-stop` does not support sending arbitrary signals.
By default, `lxc-stop -n <id>` would send `SIGPWR`.
The lxc driver was always sending `lxc-stop -n <id> -k`, which always
sends `SIGKILL`. In this case `lxc-start` returns an exit code of `0`,
regardless of what the container actually exited with.
Because of this we must send signals directly to the process when we
can.

Also need to set quiet mode on `lxc-start` otherwise it reports an error
on `stderr` when the container exits cleanly (ie, we didn't SIGKILL it),
this error is picked up in the container logs... and isn't really an
error.

Also cleaned up some potential races for waitblocked test.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-05-06 11:56:48 -04:00
Doug Davis 54662eae10 Fix RUN's error msg when it fails
When RUN returns with a non-zero return code it prints the command
that was executed as a Go []string:
```
INFO[0000] The command &{[/bin/sh -c noop a1 a2]} returned a non-zero code: 127
```

instead it should look like this:
```
INFO[0000] The command "/bin/sh -c noop a1 a2" returned a non-zero code: 127
```

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-05 16:08:41 -07:00
Doug Davis 08b7f30fcd Fix issue where build steps are duplicated in the output
This fixes an issue where the build output for the "Steps" would look like:
```
Step 1: RUN echo hi echo hi
```
instead of
```
Step 1: RUN echo hi
```

Also, I noticed that there were no checks to make sure invalid Dockerfile
cmd flags were caught on cmds that didn't use cmd flags at all. They would
have been caught on the cmds that had flags, but cmds that didn't bother
to add a new code for flags would have just ignored them.  So, I added
checks to each cmd to flag it.

Added testcases for issues.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-05 15:28:42 -07:00
Arnaud Porterie e960e4bb12 Merge pull request #11844 from jbarbier/cgroup-parent-42
Adding cgroup-parent option for docker build
2015-05-05 14:46:47 -07:00
Alexander Morozov 77266a67e0 Merge pull request #12947 from runcom/11577-readonly-special-file-if-readonlyfs
Make /etc/hosts, /etc/resolv.conf, /etc/hostname read only if --read-only enabled
2015-05-05 09:45:24 -07:00
Lei Jitang 0e08e9aca1 Add support --net=container with --mac-address,--add-host error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-05 19:28:40 +08:00
Qiang Huang 5a6db4fd44 a few cleanups for client output
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-05 15:59:17 +08:00
Tibor Vass 91fb4d672a Merge pull request #10766 from cpuguy83/stats_pull_once
Allow pulling stats once and disconnecting.
2015-05-04 22:28:01 -07:00
Yuan Sun 6e8aa4e588 Verify the no-trunc option for the search operation.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-05-05 08:51:13 +08:00
Arnaud Porterie 44de5fecce Add DOCKER_USERLANDPROXY test variable
Add an convenient way to switch --userland-proxy on and off in
integration tests.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-04 16:07:51 -07:00
Arnaud Porterie f42348e18f Add `--userland-proxy` daemon flag
The `--userland-proxy` daemon flag makes it possible to rely on hairpin
NAT and additional iptables routes instead of userland proxy for port
publishing and inter-container communication.

Usage of the userland proxy remains the default as hairpin NAT is
unsupported by older kernels.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-04 16:07:45 -07:00
Antonio Murdaca 8771cafab6 Add tests for API container delete
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-04 22:41:57 +02:00
David Calavera 0a2ccb1cb5 Merge pull request #12769 from calavera/git_build_fragment
Use git url fragment to specify build reference and dir context.
2015-05-04 12:48:24 -07:00
mauriyouth 7d371c0b47 Make /etc/hosts, /etc/resolv.conf, /etc/hostname read only if --read-only is enable
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-04 21:30:52 +02:00
Phil Estes 24bd3db0b5 Merge pull request #12939 from draghuram/history_test
Adding test for "GET /images/(name)/history" API.
2015-05-04 12:58:43 -04:00
David Calavera 49fd83a25e Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-04 09:28:06 -07:00
Brian Goff f3023a93d1 Allow pulling stats once and disconnecting.
Adds a `stream` query param to the stats API which allows API users to
only collect one stats entry and disconnect instead of keeping the
connection alive to stream more stats.

Also adds a `--no-stream` flag to `docker stats` which does the same

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-05-04 10:49:13 -04:00
Yuan Sun 9eefd2c17d Verifiy status Codes 404 when no such image
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-05-04 15:39:40 +08:00
Raghuram Devarakonda aaaa8bab0c Adding test for "GET /images/(name)/history" API.
Closes #12284.

Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2015-05-02 23:09:32 -04:00
Tianon Gravi 576985a1dc Finally remove our copy of "archive/tar" now that Go 1.4 is the minimum!
IT'S ABOUT TIME. 🎉

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-05-01 16:01:10 -06:00
Jessie Frazelle 1f2f3db1e3 Merge pull request #12720 from DarianAnjuhal/fix-ensure-dockerinit
TestDiffEnsureDockerinitFilesAreIgnored is too long
2015-05-01 14:52:34 -07:00