Commit Graph

13575 Commits

Author SHA1 Message Date
Ahmet Alp Balkan b81105eaca integration-cli: use pipes for save/load tests
This removes `bash` dependency from save/load integration tests.
It used to call `/bin/bash -c 'c:\...\docker.exe'` which is not valid.
Also removed usage of tempdirs and temp files for saving/loading
repos. All are now done using in-memory pipes and buffers.

Created `runCommandPipelineWithOutput` helper to replace the
`/bin/bash -c 'a | b | c'` using pipes and returning output from
last command in the pipeline. This makes the code even shorter
and readable.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-17 17:09:09 -08:00
Ahmet Alp Balkan 28842d3f09 pkg/archive: Canonicalize stored paths
Currently pkg/archive stores nested windows files with
backslashes (e.g. `dir\`, `dir\file.txt`) and this causes
tar not being correctly extracted on Linux daemon.

This change assures we canonicalize all paths to unix
paths and add them to tar with that name independent of platform.

Fixes the following test cases for Windows CI:
- TestBuildAddFileWithWhitespace
- TestBuildCopyFileWithWhitespace
- TestBuildAddDirContentToRoot
- TestBuildAddDirContentToExistingDir
- TestBuildCopyDirContentToRoot
- TestBuildCopyDirContentToExistDir
- TestBuildDockerignore
- TestBuildEnvUsage
- TestBuildEnvUsage2

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-17 16:51:04 -08:00
James Turnbull 6c4e1387d1 Merge pull request #10846 from chenhanxiao/pause-unpause-link
docs: add See also for description of pause and unpause
2015-02-17 19:26:56 -05:00
Sven Dowideit 3ba0d2985b Merge pull request #10845 from tianon/uhhhh
Fix "upstream remote" dependence in Makefile
2015-02-18 10:20:30 +10:00
Mary Anthony 112aa1e341 Fixing spacing after period 2015-02-17 16:10:32 -08:00
Mary Anthony 1b36272dc3 Adding in Fred's comments. 2015-02-17 15:59:29 -08:00
Mary Anthony abc6896984 Tweaking language 2015-02-17 11:02:25 -08:00
Mary Anthony 0581e8652d Updating per Sven's request for localhost definition 2015-02-17 10:55:19 -08:00
Mary Anthony d03ce18b0b Adding in updates for Mac for birthday.
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
2015-02-17 09:58:58 -08:00
Ferenc Szabo 112829434d fix source command for tab-completion
source /etc/bash_completion.d/docker.io was not working for me, since the file is called docker, not docker.io.

There might be versions with 'io' ending; star is general enough.

Signed-off-by: Ferenc Szabo <pragmaticfrank@gmail.com>
2015-02-17 16:53:18 +01:00
Lei Jitang 57abf4afe9 Fix docker run --expose with an invalid port does not error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-02-17 07:12:02 -08:00
Pavel Tikhomirov cad770f992 integration-cli: check that docker port command output is not empty
Or else we can violate array range boundaries in:
	out = strings.Split(out, ":")[1]
and get runtime error.

We got this runtime error when run TestRunPortFromDockerRangeInUse
Somehow docker goes silently if it cannot publish port because
of no bridge.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@parallels.com>
2015-02-17 16:01:34 +03:00
Ahmet Alp Balkan df5334183f integration-cli: generate unix-style volume paths
Some tests in `docker_api_containers_test.go` assume the
docker daemon is running at the same machine as the cli
and uses `ioutil.TempDir` to create temp dirs and use them
in the test.

On windows ioutil.TempDir and os.TempDir would create win-style
paths and pass them to daemon. Instead, I hardcoded `/tmp/` and
generate some random path manually and allow daemon to create
the directory.

Fixes tests:
- TestContainerApiStartVolumeBinds
- TestContainerApiStartDupVolumeBinds
- TestVolumesFromHasPriority

Downside:
- Does not clean the temp dirs generated on the remote daemon
  machine unless delete container deletes them.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-17 01:29:23 -08:00
Solomon Hykes 0d41c6abad Add Steve and Mary as docs maintainers
Signed-off-by: Solomon Hykes <solomon@docker.com>
2015-02-17 09:16:46 +00:00
Ahmet Alp Balkan bc37c036b5 integration-cli: add mechanism to skip tests
If DOCKER_CLIENTONLY is set for test-integration-cli, we don't set
the 'daemon' build tag. 'isRemoteDaemon' will help us skip such
tests without a need to move them to a separate file and accidentally
lose track of them.

Added `testRequires` function to skip tests based on predefined
conditions evaluated in runtime. This way we can easily extend test
requirements like:

    testRequires(t, Networking, SameHostDaemon, Linux)

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2015-02-17 00:43:41 -08:00
Jason Sommer 0826ac1581 Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
2015-02-16 20:38:52 -06:00
Chen Hanxiao a69b189fc5 docs: add See Also for description of pause and unpause
make them reference to each other.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-17 10:22:28 +08:00
Tianon Gravi d7ec4360c1 Fix "upstream remote" dependence in Makefile
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-02-16 18:11:31 -07:00
Jessie Frazelle 2243e32cbb Merge pull request #10764 from grossws/patch-1
Cleanup: changed ./hack to ./project in README.md
2015-02-16 13:30:02 -08:00
Jessie Frazelle 4965304772 Merge pull request #10834 from albers/completion-fix-run--d
Fix bash completion for docker run -d
2015-02-16 12:01:39 -08:00
Jessie Frazelle 39df8473d6 Merge pull request #10796 from ahmetalpbalkan/win-cli/TestCliProxyDisableProxyUnixSock-fix
integration-cli: use remote daemon env var in TestCliProxyDisableProxyUnixSock
2015-02-16 11:59:46 -08:00
Jessie Frazelle 110ce4f6cd Merge pull request #10804 from ahmetalpbalkan/win-cli/TestRunSlowStdoutConsume-fix
integration-cli: remove bash dependency of TestRunSlowStdoutConsumer
2015-02-16 11:58:55 -08:00
Jessie Frazelle 3ddef31793 Merge pull request #10780 from estesp/test-bogus-link
Fix daemon.Get() error handling with --link setup. Add test.
2015-02-16 11:22:21 -08:00
Jessie Frazelle 9054e4dca3 Merge pull request #10779 from duglin/10771-FixStatsHelp
Fix 'docker stats' help message
2015-02-16 11:18:58 -08:00
Jessie Frazelle 8b58e73da4 Merge pull request #10820 from ahmetalpbalkan/small-nit
Correct username in [Org."Core Maintainers"]
2015-02-16 11:12:22 -08:00
Jessica Frazelle ba99a73c2f fix naming, add a test for port range on docker ps
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-02-16 11:08:32 -08:00
Michael Crosby bce2ae655c Merge pull request #10783 from tianon/BINDDIR-yes-two-Ds
Rename BINDDIR to BIND_DIR
2015-02-16 11:00:44 -08:00
Michael Crosby c2effb259d Merge pull request #10615 from coolljt0725/fix_mount
Fix create volume /etc cover /etc/{hosts,resolv.conf,hostname} Fixes # 10604
2015-02-16 10:53:26 -08:00
Colm Hally 5dfef4fe08 Group published and exposed ports by contiguous ranges
Signed-off-by: Colm Hally <colmhally@gmail.com>
2015-02-16 10:52:23 -08:00
Michael Crosby 73665ff5f2 Merge pull request #10633 from hqhq/hq_fix_memoryswap
fix the problem that memory-swap=-1 is not working for docker command
2015-02-16 10:49:01 -08:00
Michael Crosby 9ea20f260c Merge pull request #10571 from jfrazelle/8689-remove-all-aliases
Removes the feature to pull all image aliases.
2015-02-16 10:29:20 -08:00
Harald Albers 01bd90c4ad Fix bash completion for docker run -d
Signed-off-by: Harald Albers <github@albersweb.de>
2015-02-16 19:23:29 +01:00
Malte Janduda a9a19bd911 add IPv6 NDP Proxying documentation
Signed-off-by: Malte Janduda <mail@janduda.net>
2015-02-16 19:20:00 +01:00
Ahmet Alp Balkan ae8f1fa712 integration-cli: remove bash dependency of TestRunSlowStdoutConsumer
This makes this test case run on msys bash on windows or
cmd.exe.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-16 10:18:27 -08:00
Ahmet Alp Balkan 029ca9829d integration-cli: use remote daemon in proxy test
TestCliProxyDisableProxyUnixSock runs `docker info` by
clearing env however if the daemon is set up to run in a
different machine (e.g. Windows CI case) it does not make
use of DOCKER_TEST_HOST and tries to connect unix sock.

This fix injects DOCKER_HOST back to the test.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-16 10:14:54 -08:00
Ahmet Alp Balkan 0ae1ef3b12 Correct username in org."Core Maintainers"
My OCD has managed to catch this.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2015-02-16 10:13:12 -08:00
Michael Crosby c6110bd48f Merge pull request #10829 from duglin/10828-UpdateCLIHelp
Use newer help out for 'docker' and 'docker run'
2015-02-16 10:13:00 -08:00
Jessie Frazelle 7e9dd94376 Merge pull request #10793 from ahmetalpbalkan/win-cli/TestExportContainerAndImportImage-fix
integration-cli: use cmd.Stdin instead of cat/tee for TestExportContainerAndImportImage
2015-02-16 10:11:47 -08:00
Jessie Frazelle 546f481840 Merge pull request #10795 from ahmetalpbalkan/integration-cli/makeRandomString
integration-cli: Seed rand in makeRandomString
2015-02-16 10:08:20 -08:00
Arnaud Porterie 9ee8d41ab2 Merge pull request #10800 from ahmetalpbalkan/TestRunEnv-fix
integration-cli: Preserve DOCKER_TEST_HOST in env-clearing tests
2015-02-16 09:23:42 -08:00
Arnaud Porterie 38ca779dd6 Merge pull request #10747 from ahmetalpbalkan/win-cli/TestContainersAttachWS-fix
TestGetContainersAttachWebsocket: use DOCKER_TEST_HOST if specified
2015-02-16 09:19:54 -08:00
Doug Davis effa5e2c18 Use newer help out for 'docker' and 'docker run'
Closes #10828

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-16 08:46:07 -08:00
James Turnbull 924b7154ba Merge pull request #10801 from cyrilf/patch-1
Documentation - smallest typo correction ever
2015-02-15 20:38:45 -05:00
Doug Davis 028968f1a2 Merge pull request #10808 from chenhanxiao/man-Dockerfile-typo
docs: fix a typo in Dockerfile.5.md
2015-02-15 07:48:29 -05:00
Chen Hanxiao bfba622f86 docs: fix a typo in Dockerfile.5.md
s/Exececutable/Executable

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-15 11:06:18 +08:00
Tibor Vass c33ac6067c Merge pull request #10799 from ahmetalpbalkan/win-cli/TestRmiForceWithExistingContainers-fix
integration-cli: fix test to use busybox outside container
2015-02-14 15:47:55 -05:00
Cyril F 582c360d57 Smallest typo correction ever
Signed-off-by: Cyril Francesconi <cyrilf7x@gmail.com>
2015-02-14 17:51:28 +01:00
James Turnbull 9456a25414 Merge pull request #10757 from thaJeztah/docs-enhance-volume-lifecycle-description
Docs: Improve description on volume removal
2015-02-14 11:08:28 -05:00
Sebastiaan van Stijn 00f2fd1dd5 Docs: Improve description on volume removal
A comment in https://github.com/docker/docker/issues/6354#issuecomment-74160215
brought to light that the "Managing Data in containers" section contained an
incorrect (or confusing) line;

  "Volumes persist until no containers use them"

Which implies that volumes are automatically removed if they are no longer
referenced by a container.

This pull-request attempts to add some information explaining that volumes are
never automatically removed by Docker and adds some extra hints on working
with data volumes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-02-14 17:04:06 +01:00
Ahmet Alp Balkan 4f377fbe9f docker_cli_run_test: Preserve DOCKER_TEST_HOST in env-clearing tests
For Windows, we run integration-cli with DOCKER_TEST_HOST env var b/c
daemon is on some remote machine. This keeps the DOCKER_HOST set by
bash scripts in the env.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-14 03:26:56 -08:00