Commit graph

13931 commits

Author SHA1 Message Date
Ahmet Alp Balkan
e424c54d9c 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>
2015-03-11 10:28:56 -07:00
Jessica Frazelle
4602241f11 Fix clear cache docs release.
Clear the cache for all files. Don't worry about what changed.

Move the docs release script back to the docker/docker repo, so we all can
easily watch the changes.

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)
2015-03-11 10:11:13 -07:00
Phil Estes
ed3f383507 Remove escaping from TESTFLAGS; it is no longer required
In fact, it doesn't work as the bare `\` backslashes are now preserved
and therefore are not valid regex matches on any test, making it not run
any tests at all.  I assume at some point there was a process in the
pipeline that needed escaping, but on master (for quite a while) this
has not worked.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-11 13:09:40 -04:00
moxiegirl
d010bf0d99 Merge pull request #11291 from ahmetalpbalkan/info/system-date
Add system time to /info
2015-03-11 09:43:43 -07:00
Doug Davis
1b46248a33 Minor tweak to build -f text to make it clear Dockerfile is in context
Closes #11289

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-11 09:04:30 -07:00
Doug Davis
779dca61e5 Add "Docker" to Reference pull-down for Command Line
A minor thing, but I noticed that the "Reference" drop-down menu just
says "Command line".  This was fine when we just had one command line,
but now there's also 'Compose command line' and I suspect we may add
others later.  We should qualify the Docker one with the word "Docker"
in front

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-11 07:43:33 -07:00
Doug Davis
645f8a32df 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>
2015-03-11 07:30:44 -07:00
Tibor Vass
830544044e Merge pull request #11317 from zenlinTechnofreak/helpSuffixSpace
Help suffix space
2015-03-11 10:04:23 -04:00
Tibor Vass
1a5e46ce89 Merge pull request #11316 from ahmetalpbalkan/win-cli/help-homepath-fix
Make use of %USERPROFILE% in cli help message
2015-03-11 09:28:43 -04:00
Zen Lin(Zhinan Lin)
491b63e0da Add checking trailing space for all lines of the help output
Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
2015-03-11 21:24:30 +08:00
Phil Estes
95dcb27484 Merge pull request #11244 from ChristopherBiscardi/docs-code-fixes
Fix a few code rendering errors in docs
2015-03-11 08:34:53 -04:00
Zen Lin(Zhinan Lin)
2b051bcbda 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>
2015-03-11 18:58:32 +08:00
Zen Lin(Zhinan Lin)
f63a29ddee 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>
2015-03-11 18:46:01 +08:00
Ahmet Alp Balkan
802c905000 Make use of %USERPROFILE% in cli help message
An earlier commit was causing docker windows CLI build to not to pick up
the shorthand form for home directory (`%USERPROFILE%`) shown in when
`docker --help` is executed.

Fixing that bug and making the if statement concise and clear.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-11 02:14:49 -07:00
bobby abbott
12b278d354 Remove import to utils in progressreader
Added method in StreamFormatter to handle calls
from progressreader. Solves #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07:00
Rick Wieman
179e45f27c Adds 'name' filter to the CLI reference.
Also sorts the filter and fixes the bullet list.

Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-11 07:41:56 +01:00
Ahmet Alp Balkan
44ffb199d0 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>
2015-03-10 22:48:35 -07:00
moxiegirl
558c3b09db Merge pull request #11307 from moxiegirl/fix-contributors-logo
Fixing broken image thanks @SvenDowideit
2015-03-10 22:48:10 -07:00
moxiegirl
dd6f76a76c Merge pull request #10663 from brahmaroutu/events_filterbyname_10645
filter events by container name
2015-03-10 21:16:39 -07:00
moxiegirl
a58f0d47f3 Merge pull request #11306 from x1022as/master
Fix minor typo
2015-03-10 20:55:37 -07:00
Mary Anthony
add13cb782 Fixing broken image
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
2015-03-10 20:47:06 -07:00
Mabin
0648e59ad8 docs: api-enable-cors is deprecated,updated docs description
Signed-off-by: Mabin <bin.ma@huawei.com>
2015-03-11 11:38:37 +08:00
moxiegirl
c3c29284ae Merge pull request #11263 from moxiegirl/edit-ilo-new-contribguide
Updating to account for new contributors guide.
2015-03-10 20:36:51 -07:00
Deng Guangxing
ce1a0b612d Fix minor typo
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2015-03-11 11:13:39 +08:00
ChristoperBiscardi
4ab18fa2ac Modify ip_forward instructions
Signed-off-by: ChristoperBiscardi <chris@docker.com>
2015-03-10 19:28:55 -07:00
Qiang Huang
837eec064d 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>
2015-03-11 09:31:18 +08:00
Qiang Huang
bffe04b582 fix warning messages
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 08:47:45 +08:00
Michael Crosby
2772a47519 Merge pull request #10853 from rhatdan/audit_read
Need to support new linux capability AUDIT_READ
2015-03-10 17:28:50 -07:00
Dan Walsh
72f366238f Need to support new linux capability AUDIT_READ
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-10 20:01:06 -04:00
Ahmet Alp Balkan
2977fd2b7a Add system time to /info
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.

I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-10 15:29:05 -07:00
Mary Anthony
10c01fce45 Consistency in the restart policy docs
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
2015-03-10 15:13:34 -07:00
John Howard (VM)
081c6c76e2 Factor out ServeFD & systemd in server for Linux only (Not Windows)
Signed-off-by: John Howard <John.Howard@microsoft.com>
2015-03-10 15:06:16 -07:00
Alexander Morozov
d59212e605 Check oom status after container stopped in lxc driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 13:45:13 -07:00
Mary Anthony
933f207fd8 Updating to account for new contributors guide.
Primary links will go to the contributor's guide
Adding in Fred's comments
Tweak list alignment

Signed-off-by: Mary Anthony <mary.anthony@docker.com>
2015-03-10 13:30:46 -07:00
Alexander Morozov
13bfbfc84b Merge pull request #11292 from jfrazelle/cleanup-defer
cleanup defer func
2015-03-10 12:46:16 -07:00
Jessica Frazelle
17a784aa09 cleanup defer func
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)
2015-03-10 12:18:43 -07:00
Jessie Frazelle
e4b753c1de Merge pull request #11211 from cpuguy83/ensure_engine_shutdown
Ensure clean engine shutdown on startup errors
2015-03-10 12:13:35 -07:00
Jessie Frazelle
7e47bb6eff Merge pull request #11235 from coolljt0725/fix_default_restart_name
Set default restart policy name to `no` Closes #10874
2015-03-10 12:12:40 -07:00
Jessie Frazelle
8be1671f45 Merge pull request #11288 from estesp/warn-on-localhost-dns
Add warning for --dns flag set to localhost addresses.
2015-03-10 12:03:46 -07:00
Phil Estes
afa92a9af0 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)
2015-03-10 14:43:17 -04:00
Tibor Vass
d26e3cfd52 Merge pull request #11287 from rhatdan/homedir
If $HOME is not set, return homedir from /etc/passwd
2015-03-10 14:38:30 -04:00
Michael Crosby
7dac3f417d Merge pull request #11267 from thaJeztah/simplify-parser_test
cleanup: simplify parser_test
2015-03-10 11:05:39 -07:00
Michael Crosby
ec7621aab5 Merge pull request #11277 from chenhanxiao/RELEASE-CHECKLIST-typo
RELEASE-CHECKLIST: fix a typo
2015-03-10 10:50:34 -07:00
Michael Crosby
1835665e94 Merge pull request #11290 from LK4D4/fix_lxc_for_new_api
Use CgroupString instead of missing GetCgroupAllowString in lxc_template
2015-03-10 10:39:17 -07:00
Alexander Morozov
821ec8334f Setup user groups in lxc driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 09:43:11 -07:00
Phil Estes
1b1cc100f2 Merge pull request #11282 from duglin/FixAPITestCode
Fixup a test for -f processing
2015-03-10 12:10:08 -04:00
Tibor Vass
eb21eb95e5 Merge pull request #11143 from dmcgowan/graph-v2-push-cleanup
Cleanup v2 push logic
2015-03-10 11:56:02 -04:00
Alexander Morozov
c8c11bfc36 Use CgroupString instead of missing GetCgroupAllowString in lxc_template
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 08:50:03 -07:00
Tibor Vass
cda003775f Merge pull request #11218 from tianon/refactor-frozen
Refactor busybox downloading as generic "frozen-images"
2015-03-10 11:47:00 -04:00
Jessie Frazelle
2fb89b2e2c Merge pull request #11208 from LK4D4/new_libcontainer_api
New libcontainer api
2015-03-10 07:50:19 -07:00