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

875 Коммитов

Автор SHA1 Сообщение Дата
Lei Jitang f3713010dd Add tests for create /etc volume
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-02-12 10:39:07 +08:00
Doug Davis 1654dfdf14 Show err msg on empty 'scratch' Dockerfile
If you have a Dockefile with just:
   FROM scratch

An error is generated but its never shown to the CLI. This PR fixes that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-10 11:43:45 -08:00
Alexander Morozov d14751bf30 Merge pull request #10671 from tiborvass/remove-fail-word-from-tests
Remove word "fail" from tests
2015-02-09 20:53:15 -08:00
Michael Crosby 7cc76a7fda Merge pull request #10561 from duglin/SupportNoArgCmds
Add support for no-arg commands in Dockerfile
2015-02-09 18:08:14 -08:00
Tibor Vass aadb6289cc Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-02-09 18:01:52 -05:00
Phil Estes 35d4825838 Clean up dup. volume test and add API test for the same
Handles missed comments in PR#10622 and adds an API test to validate
error returned properly for duplicate bind mounts for the same
container target path.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-02-09 12:33:58 -05:00
Qiang Huang aee28e0e87 fix the problem that memory-swap=-1 is not working for docker command
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-02-09 10:36:49 +08:00
Doug Davis d1e9d07c1b Get list of Dockerfile cmds from builder so we can be smarted in our tests
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-08 08:09:02 -08:00
Doug Davis e4f02abb51 Add support for no-arg commands in Dockerfile
We're hoping to add some new commands that don't have any args so this
PR will enable that by removing all of the hard-coded checks that require
commands to have at least one arg.  It also adds some checks to each
command so we're consistent in the error message we get.  Added a test
for this too.

We actually had this check in at least 3 different places (twice in the
parser and once in most cmds), this removes 2 of them (the parser ones).

Had to remove/modify some testcases because its now legal to have certain
commands w/o args - e.g. RUN. This was actually inconsistent because
we used to allow "RUN []" but not "RUN" even though they would generate
(almost) the same net result.  Now we're consistent.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-08 03:36:49 -08:00
Alexander Morozov f208201375 Merge pull request #10607 from chenhanxiao/enable-upper-proto
nat: enable upper case proto
2015-02-07 16:56:35 -08:00
Chen Hanxiao 0552f1a0ca docker_cli_build_test: add testcase of EXPOSE 5678/UDP
test whether we could use upper case proto in EXPOSE

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-08 07:04:22 +08:00
André Martins ab4bc988bc Fixed one small typo of docker_cli_build_test.go
Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 15:37:58 +00:00
Arnaud Porterie c03d6f57b6 Merge pull request #10594 from dmcgowan/v2-registry-tarsum-errors
Update verification message logic
2015-02-06 17:01:34 -08:00
Tibor Vass b0ed2da441 Merge pull request #10112 from cpuguy83/4393_fix_volume_where_file_exists
Error out if file in container at volume path
2015-02-06 19:39:48 -05:00
André Martins 0ce42dcc96 Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause.
Created a new test file dedicated for pause commands.
Created a new utility function to get a slice of paused containers.
Updated documentation

Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 00:28:49 +00:00
Jessie Frazelle 271a073a04 Merge pull request #10622 from estesp/10618-err-ondup-bind-vols
Don't allow duplicate `-v` specifications for the same target
2015-02-06 15:03:56 -08:00
Brian Goff c73e3bf4dc Error out if file in container at volume path
Fixes #4393

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-06 18:00:00 -05:00
Michael Crosby eb79acd7a0 Merge pull request #10421 from noironetworks/10388-Specifying_confliting_options
Specifying -a and -d to docker run should throw an error
2015-02-06 14:58:08 -08:00
Michael Crosby 9d140fe693 Merge pull request #10105 from LK4D4/remove_tons_of_names
Use graphdb.Walk with depth=1 in /containers
2015-02-06 14:33:26 -08:00
Alexander Morozov b6dc430d99 Merge pull request #10153 from acbodine/api_websocket_test
Adds test for api attach via websocket
2015-02-06 14:29:54 -08:00
Alexander Morozov 2a3225eb82 Test for links names in ps --no-trunc
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 14:05:08 -08:00
Phil Estes d1f33d12d4 Don't allow duplicate `-v` specifications for the same target
Addresses: #10618

Given that the user has no notification that they tried to bind mount
different directories on the same target in the container, this errors
out in that case, without changing the current code allowing for
--volumes-from to trump -v/VOLUME specifications.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-02-06 17:00:53 -05:00
Tibor Vass a982432c16 Merge pull request #10601 from LK4D4/fix_tag_name_in_ps
Show right tag for container in ps
2015-02-06 16:59:49 -05:00
Tibor Vass 82191cc3f3 Merge pull request #10120 from duglin/TrimSpaces
Remove leading/trailing spaces in builder/parser
2015-02-06 16:25:37 -05:00
Doug Davis 969ba5c7ed Make checking of help text smarter
As I was reworking https://github.com/docker/docker/pull/9402 I realized
that the new testcase I just added that verified all help text is within
80 characters really should be smarter and ask "docker help" for the list
of commands to check instead of having a hard-coded list.  This way
it will catch "docker execwait" automagically once #9402 is merged.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-06 13:02:58 -08:00
Alexander Morozov e45deceb46 Show right tag for container in ps
Fixes #10599

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 11:32:01 -08:00
Doug Davis 3859c48531 Remove leading/trailing spaces in builder/parser
Per Erikh's suggestion at:
https://github.com/docker/docker/pull/9989#issuecomment-69832009
this PR will trim spaces in the parser to ensure that the user gets the same
results irrespetive of leading/trailing spaces.

Per @tiborvass's suggestion I added a test to make sure spaces in quotes
are not touched.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-06 08:52:18 -08:00
Derek McGowan 6088df20c3 Update verification message logic
Only show the verification message if all the tarsum checks pass and the image manifest is verified.
No longer return an error when a tarsum verification fails, just reset the verification flag.
Tarsum verification is less meaningful without a verified manifest and therefore it should not cause an error.
Updated the verified image test to pull an image which expected to have a verified manifest and contents.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-02-05 17:46:55 -08:00
Abin Shahab ea0fd0e8e5 Added /dev paths to layer comparison
Lxc images have /dev (devices). This creates a list with the /dev paths in the test.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-02-05 20:36:30 +00:00
Doug Davis 2203b37733 Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-04 07:59:16 -08:00
Tibor Vass 73d5baf585 builder: prevent Dockerfile to leave build context
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-02-02 23:40:24 -08:00
Doug Davis 198ff76de5 Add an API test for docker build -f Dockerfile
I noticed that while we have tests to make sure that people don't
specify a Dockerfile (via -f) that's outside of the build context
when using the docker cli, we don't check on the server side to make
sure that API users have the same check done. This would be a security
risk.

While in there I had to add a new util func for the tests to allow us to
send content to the server that isn't json encoded - in this case a tarball

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-02 23:40:20 -08:00
Alexander Morozov 4ee05a4d3e Fix some go vet errors
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-02 14:53:20 -08:00
Michael Crosby 382f187b1a Merge pull request #10455 from ashahab-altiscale/9875-lxc-symlink
Fixes symlink, container size, and kmsg tests
2015-02-02 13:13:27 -08:00
André Martins af90fe6a63 Fixes #10388
The cmd.Lookup should be "-attach" and not "attach", as seen in
docker/docker/runconfig/parse.go

Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-02 12:07:52 +00:00
Arnaud Porterie de8ea06d7d Fix race in test registry setup
Wait for the local registry-v2 test instance to become available to
avoid random tests failures.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-31 11:31:41 -08:00
Derek McGowan 403d981d70 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-30 14:20:32 -08:00
Abin Shahab 29ac29a436 Fixes symlink, container size, and kmsg tests
Changes symlink, container size and kmsg tests to account for lxc driver.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-30 09:30:42 +00:00
Jessie Frazelle d748ec31d5 Merge pull request #10446 from dmcgowan/defer-key-file-creation
Defer creation of trust key file until needed
2015-01-29 15:23:35 -08:00
Derek McGowan 0eed1f4d8d Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-29 13:46:12 -08:00
Tibor Vass fb9363eb2a Merge pull request #10368 from jfrazelle/lingering-exec-test
Move one last exec test :)
2015-01-28 21:21:05 -05:00
Tibor Vass 70fbd45a5c Merge pull request #10123 from duglin/Issue10097
Build CMD/ENTRYPOINT cache strings properly
2015-01-28 14:43:16 -05:00
Jessica Frazelle 6a2c6e971d Move one last exec test :)
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-26 17:17:08 -08:00
Brian Goff b54305ae23 Do not return err on symlink eval
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-26 15:22:32 -05:00
Arnaud Porterie 74014e4a92 Merge pull request #10335 from euank/EmptyLayerConfig
Allow empty layer configs in manifests
2015-01-26 11:53:36 -08:00
Michael Crosby 364c64cf1a Merge pull request #10295 from ashahab-altiscale/9875-lxc-exit-code
Adds ipc namespace capability to lxc, and fixes tests.
2015-01-26 11:21:48 -08:00
Euan d477d42dd3 Allow empty layer configs in manifests
Before the V2 registry changes, images with no config could be pushed.
This change fixes a regression that made those images not able to be
pushed to a registry.

Signed-off-by: Euan Kemp <euank@euank.com>
2015-01-24 14:27:37 -08:00
Jessica Frazelle 43d1c20101 Move links exec test & exec dir test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-23 16:20:46 -08:00
Jessica Frazelle ecdbc1a0af Add build flag to exec test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-23 16:18:39 -08:00
Jessica Frazelle 957cbdbf30 Move InspectExecID test to exec.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-23 16:18:39 -08:00
Jessie Frazelle 54ddb9b41d Merge pull request #10288 from tiborvass/fix-test-attach
integration-cli: wait for container before sending ^D
2015-01-22 15:07:46 -08:00
Tibor Vass a124bfaef3 integration-cli: wait for container before sending ^D
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-22 17:28:35 -05:00
Arnaud Porterie 5a6f84ce08 Merge pull request #10282 from tiborvass/fix-test-restart-policy-always
integration-cli: Fix race in restart loop
2015-01-22 13:17:23 -08:00
Arnaud Porterie 10ab6dcb4f Merge pull request #10234 from dmcgowan/libtrust-key-fix
Fix daemon key file location
2015-01-22 11:54:03 -08:00
Tibor Vass 752a0d6f34 integration-cli: Fix race in restart loop
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-22 14:06:24 -05:00
Derek McGowan 42612ff6db Add key migration integration test
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-22 10:51:04 -08:00
Derek McGowan a34a7930b5 Add TODO lines for windows
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-22 10:29:15 -08:00
Alexander Morozov 4aa60a902a Merge pull request #10250 from crosbymichael/stats-test
Improve robustness of /stats api test
2015-01-22 09:09:03 -08:00
Andrew C. Bodine 9e37a04665 Adds test for api attach via websocket
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
2015-01-21 18:35:51 -08:00
Derek McGowan 06af013f8b Fix daemon key file location
Fixes #10233

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-21 16:28:19 -08:00
Jessica Frazelle 614e09a8c7 Add test for pull verified
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-21 16:25:01 -08:00
Michael Crosby 4d7707e183 Improve robustness of /stats api test
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-21 16:00:15 -08:00
Jessie Frazelle f1bc0376b8 Merge pull request #10254 from LK4D4/fix_etchosts_rewriting
Fix etchosts rewriting
2015-01-21 15:08:45 -08:00
Alexander Morozov 606c71d424 Test for updating linked hosts on restart
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-21 14:34:40 -08:00
Michael Crosby edaf23b7a7 Merge pull request #10145 from duglin/Issue10141
Docker run -e FOO should erase FOO if FOO isn't set in client env
2015-01-21 14:16:51 -08:00
Alexander Morozov f72bcd3362 Merge pull request #10200 from cpuguy83/fix_racey_TestAttachAfterDetach
Fix racey TestAttachAfterDetach
2015-01-21 09:20:24 -08:00
Brian Goff 6ef8057700 Fix racey TestAttachAfterDetach
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-21 10:08:37 -05:00
Abin Shahab 3ca5af6b1a Adds ipc namespace capability to lxc, and fixes tests.
This fixes various tests by checking for non zero exit code, accounting for lxc-specific base-diffs, and by removing lxc specific environment vars.
It also adds the --share-ipc option to lxc-start for shared ipc namespaces.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-21 06:08:00 +00:00
Michael Crosby 217a2bd1b6 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby 76141a0077 Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby 5f5e02d22c Merge pull request #10122 from dqminh/execin-wait-cgroup
ExecIn process should wait for the parent signal before forking
2015-01-20 18:02:14 -08:00
Brian Goff e744b0dcba Fix volume ref restore process
Fixes #9629 #9768

A couple of issues:

1) Volume config is not restored if we couldn't find it with the graph
driver, but bind-mounts would never be found by the graph driver since
they aren't in that dir

2) container volumes were only being restored if they were found in the
volumes repo, but volumes created by old daemons wouldn't be in the
repo until the container is at least started.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-20 15:54:56 -05:00
Tianon Gravi 142369456d Update TestBuildWithTabs to allow for the "\t"-equivalent "\u0009" (for Go 1.3 support)
This is literally the only failing test on Go 1.3.3: 🎉
```
--- FAIL: TestBuildWithTabs (0.43 seconds)
	docker_cli_build_test.go:4307: Missing tabs.
		Got:["/bin/sh","-c","echo\u0009one\u0009\u0009two"]
		Exp:["/bin/sh","-c","echo\tone\t\ttwo"]
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-20 12:11:59 -07:00
Daniel, Dao Quang Minh 9462dbb242 test that execin cgroups match container cgroups
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-20 13:51:15 -05:00
Alexander Morozov e9d3e237e5 Merge pull request #10005 from estesp/fix-localhost-nameserver-cleanup
Clean up localhost resolv logic and add IPv6 support to regexp
2015-01-20 10:30:06 -08:00
Michael Crosby 7b48488c56 Merge pull request #10190 from ashahab-altiscale/9875-lxc-run-links
LXC needs stdin for container to remain up
2015-01-19 17:13:37 -08:00
Phil Estes 93d51e5e97 Clean up localhost resolv logic and add IPv6 support to regexp
Addresses #5811

This cleans up an error in the logic which removes localhost resolvers
from the host resolv.conf at container creation start time. Specifically
when the determination is made if any nameservers are left after
removing localhost resolvers, it was using a string match on the word
"nameserver", which could have been anywhere (including commented out)
leading to incorrect situations where no nameservers were left but the
default ones were not added.

This also adds some complexity to the regular expressions for finding
nameservers in general, as well as matching on localhost resolvers due
to the recent addition of IPv6 support.  Because of IPv6 support now
available in the Docker daemon, the resolvconf code is now aware of
IPv6 enable/disable state and uses that for both filter/cleaning of
nameservers as well as adding default Google DNS (IPv4 only vs. IPv4
and IPv6 if IPv6 enabled).  For all these changes, tests have been
added/strengthened to test these additional capabilities.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-19 19:35:55 -05:00
Tibor Vass 50ff27caa1 Merge pull request #9826 from icecrime/8318_whitespace_add_copy
Support whitespace in paths for ADD and COPY
2015-01-19 18:37:53 -05:00
Jessie Frazelle 9b4cd01b21 Merge pull request #9730 from cpuguy83/9709_fix_volumes_from_missing_container
Fix volumes-from re-applying on each start
2015-01-19 14:00:53 -08:00
Michael Crosby 4c38045be1 Merge pull request #9968 from HuKeping/master
log: Add restart policy name to the inspect information of container
2015-01-19 11:08:32 -08:00
Jessie Frazelle 8b95ad230e Merge pull request #9784 from dmcgowan/v2-registry
Client Support for Docker Registry HTTP API V2
2015-01-19 10:46:38 -08:00
Michael Crosby 979a4cdacd Merge pull request #10152 from ashahab-altiscale/9875-cap-add-all
SEND CAPABILITY IDS TO LXC
2015-01-19 10:46:22 -08:00
Doug Davis 9ab73260f8 Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-19 08:00:32 -08:00
Abin Shahab 79f17dcf74 LXC needs stdin for container to remain up
To run shell(and not exit), lxc needs STDIN. Without STDIN open, it will exit 0.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-18 04:07:20 +00:00
Brian Goff a738df0354 Fix volumes-from re-applying on each start
Fixes #9709
In cases where the volumes-from container is removed and the consuming
container is restarted, docker was trying to re-apply volumes from that
now missing container, which is uneccessary since the volumes are
already applied.

Also cleaned up the volumes-from parsing function, which was doing way more than
it should have been.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-17 07:14:25 -05:00
Brian Goff b8f7526fc6 Make .dockercfg with json.MarshallIndent
Fixes #10129
Makes the .dockercfg more human parsable.

Also cleaned up the (technically) racey login test.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-17 07:05:56 -05:00
Abin Shahab bff3509e43 SEND CAPABILITY IDS TO LXC
Sending capability ids instead of capability names ot LXC for --cap-add and --cap-drop.
Also fixed tests.

Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-17 04:01:52 +00:00
Derek McGowan f29aacbc48 Fix failing integration tests
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-16 11:34:45 -08:00
HuKeping c3ed49dcdb restart: add test for recording restart policy name
Add test for recording restart policy name on
- restart=no
- restart=always
- restart=on-failure

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-01-16 17:58:26 +08:00
Arnaud Porterie 92d5eafe03 Test pulling image with aliases
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-15 14:05:06 -08:00
Arnaud Porterie dbec2317e5 Add some push test coverage
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-15 14:05:06 -08:00
Alexander Morozov f138f7bd50 Tests for push to registry v2
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-15 14:05:06 -08:00
Alexander Morozov 2fc2862a73 RegistryV2 datastructure for tests
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-15 14:05:06 -08:00
Doug Davis 88905793ad Build CMD/ENTRYPOINT cache strings properly
Make sure that as we build the CMD/ENTRYPOINT cache strings that we don't
treat ["echo","hi"] and ["echo hi"] as the same thing due to the fact that
we're just doing a strcat on the array.

Closes #10097

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-15 12:49:30 -08:00
Jessie Frazelle eaecf741f0 Merge pull request #10108 from tiborvass/carry-9989
[Carry] Fix a panic where RUN [] would be supplied
2015-01-14 17:12:59 -08:00
Michael Crosby c126a2303f Merge pull request #10106 from icecrime/win_integration_tests
Fix some Windows integration tests
2015-01-14 17:04:49 -08:00
Victor Vieux 27f69b0777 Merge pull request #10107 from jfrazelle/9328-fix-try-start-paused-container
Error should show when trying to start a paused container.
2015-01-14 17:02:23 -08:00
Erik Hollensbe 39343b8618 Fix a panic where RUN [] would be supplied.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-14 16:55:56 -08:00
Jessica Frazelle 02246d2d9f Error should show when trying to start a paused container.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 16:49:08 -08:00
Arnaud Porterie e1ef33449f Take DOCKER_TEST_HOST into account
Tests no longer make the assumption that the daemon can be accessed
through unix:///var/run/docker.sock.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-14 16:14:27 -08:00
Alexander Morozov 95c0f07966 Merge pull request #10093 from crosbymichael/readonly-containers
Add --read-only for read only container rootfs
2015-01-14 15:56:51 -08:00
Michael Crosby 409407091a Add --readonly for read only container rootfs
Add a --readonly flag to allow the container's root filesystem to be
mounted as readonly.  This can be used in combination with volumes to
force a container's process to only write to locations that will be
persisted.  This is useful in many cases where the admin controls where
they would like developers to write files and error on any other
locations.

Closes #7923
Closes #8752

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-14 15:41:31 -08:00
Michael Crosby 3118ccc6bc Merge pull request #10101 from LK4D4/fix_vet_errors
Fix vet errors
2015-01-14 15:18:20 -08:00
Jessica Frazelle 798215af24 Add build constraint.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 14:40:07 -08:00
Alexander Morozov a75b02fe72 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:12:03 -08:00
Victor Vieux f67c6d313b Merge pull request #10082 from jfrazelle/10081-fix-renaming
Renaming a container with an invalid name should fail
2015-01-14 13:12:36 -08:00
Jessica Frazelle a92281637f Renaming a container with an invalid name should fail
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 12:54:23 -08:00
Michael Crosby 37b69408f8 Merge pull request #10056 from coolljt0725/add_link_accept_ID
Add --link accept container ID
2015-01-14 12:50:10 -08:00
Jessie Frazelle 95fea08f7a Merge pull request #10072 from LK4D4/fix_mutable_net_files
Rewrite TestRunMutableNetworkFiles to avoid races
2015-01-14 11:48:46 -08:00
Jessie Frazelle 5136b11514 Merge pull request #10075 from LK4D4/test_for_maxcount
Test for restarting count
2015-01-14 09:17:02 -08:00
Lei Jitang 2292167b02 Add tests for --link
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-01-14 15:25:58 +08:00
Alexander Morozov 79d30364c9 Test for restarting count
This test is for #10058
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-13 20:28:44 -08:00
Michael Crosby 47e3da848f Merge pull request #10080 from crosbymichael/pid-ns
Add --pid flag for staying in the host's pid namespace
2015-01-13 17:00:18 -08:00
Michael Crosby 23b48fbe14 Merge pull request #10079 from tonistiigi/fix-attach-stdin
Fix attach stream closing issues
2015-01-13 16:40:42 -08:00
Michael Crosby 15e8f3fdd3 Add test for --pid=host
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-13 16:39:08 -08:00
Tonis Tiigi 28cf8fddd4 Fix attach stream closing issues
Fixes: #9860
Fixes: detach and attach tty mode

We never actually need to close container `stdin` after `stdout/stderr` finishes. We only need to close the `stdin` goroutine. In some cases this also means closing `stdin` but that is already controlled by the goroutine itself.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-01-14 02:03:25 +02:00
Tonis Tiigi f9876dade2 Fix filenames for unix only integration-cli tests
Test suffix comes after the platform/arch.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-01-14 00:31:25 +02:00
Alexander Morozov 492b18ac08 Rewrite TestRunMutableNetworkFiles to avoid races
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-13 14:14:36 -08:00
Arnaud Porterie cf455017e0 Support whitespaces in ADD and COPY continued
Add tests and documentation for this new feature.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-13 11:34:15 -08:00
Alexander Morozov 99a15ec8bd Merge pull request #9973 from duglin/Issue9880
Make sure that ADD/COPY still populate the cache even if they don't use it
2015-01-13 11:17:34 -08:00
Jessie Frazelle b9e42d66e7 Merge pull request #8570 from brahmaroutu/rename_container_3036
Rename a existing container
2015-01-13 10:37:29 -08:00
Arnaud Porterie 9a9339d9a2 Test case for error code when exiting on OOM
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-12 23:16:28 -08:00
Srini Brahmaroutu 21a809d9ae rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-13 03:27:17 +00:00
Vincent Batts 3ec6959240 Merge pull request #9985 from jfrazelle/fix-exited-filter-should-not-show-running
`docker ps --filter exited=status` should not show running containers
2015-01-12 15:09:22 -05:00
Vincent Batts e90e754682 Merge pull request #9987 from jfrazelle/fix-filter-status-exited-not-require-all
`docker ps --filter status=exited should not require passing -a`
2015-01-12 15:05:58 -05:00
Tianon Gravi d43f0b9fc5 Fix a few minor issues with building/running inside msysGit
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-09 17:28:40 -07:00
Doug Davis 32cde64c04 Merge pull request #9980 from erikh/parser-with-no-command
Fix a parser error where an empty RUN statement would cause a panic
2015-01-08 19:34:06 -05:00
Jessica Frazelle 81f84023be `docker ps --filter exited=status` should not show running containers
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-08 16:23:54 -08:00
Jessica Frazelle 2639e073b1 `docker ps --filter status=exited should not require passing -a`
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-08 15:37:07 -08:00
Tibor Vass 6870bde584 Merge pull request #8456 from lindenlab/cleanup-repository-info
Cleanup: Replace ResolveRepositoryName with RepositoryInfo{}
2015-01-08 17:19:03 -05:00
Alexander Morozov 92af1f0145 Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
2015-01-08 14:06:55 -08:00
Don Kjer 568f86eb18 Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
2015-01-08 20:14:58 +00:00
Erik Hollensbe 09e3467452 Fix a parser error where an empty RUN statement would cause a panic
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-08 11:30:08 -08:00
Phil Estes 63a7ccdd23 Update container resolv.conf when host network changes /etc/resolv.conf
Only modifies non-running containers resolv.conf bind mount, and only if
the container has an unmodified resolv.conf compared to its contents at
container start time (so we don't overwrite manual/automated changes
within the container runtime). For containers which are running when
the host resolv.conf changes, the update will only be applied to the
container version of resolv.conf when the container is "bounced" down
and back up (e.g. stop/start or restart)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-08 14:15:13 -05:00
Doug Davis 6f20b957b0 Make sure that ADD/COPY still populate the cache even if they don't use it
Closes #9880

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-08 06:56:30 -08:00
Jessie Frazelle 91509bfb66 Merge pull request #9936 from icecrime/noecho_start_attached
Fix cli echoing container ID on start -a|-i
2015-01-06 19:07:40 -08:00
Arnaud Porterie eeefa2dc8c Fix cli echoing container ID on start -a|-i
The cli now doesn't echo the container ID when started using either -a
or -i. Also fixes `TestStartAttachCorrectExitCode` which incorrectly
called start with the result of wait rather than the container ID.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-06 17:58:30 -08:00
Doug Davis eb3ea3b43c Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 16:33:26 -08:00
Michael Crosby 6d780139c4 Merge pull request #8748 from duglin/Issue8330
Have .dockerignore support Dockerfile/.dockerignore
2015-01-06 13:47:42 -08:00
Doug Davis 6d801a3caa Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 10:57:48 -08:00
Michal Minar 1db927113f Amended TestExecParseError test
Usage string isn't printed anymore. User is adviced to see help instead
- according to coreutils standard.

Signed-off-by: Michal Minar <miminar@redhat.com>
2015-01-06 16:48:10 +01:00
Alexander Morozov 25f8c26640 Merge pull request #9097 from brahmaroutu/publish_ports_8899
add ability to publish range of ports
2015-01-05 14:05:47 -08:00
Jessica Frazelle 367e66e972 Change url of robots.txt test to dockerproject.com
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-05 11:13:37 -08:00
Srini Brahmaroutu 2338a9cf5a add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-02 23:21:26 +00:00
Alexander Morozov 12fef2d8df Merge pull request #9800 from vieux/execIDs_inspect
Add ExecIDs to docker inspect
2014-12-29 15:32:33 -08:00
Victor Vieux c0bb1c77ee add test
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-29 23:00:17 +00:00
Jessie Frazelle d47020d18a Merge pull request #9827 from LK4D4/test_for_removing_cgroups
Test for issue #9699
2014-12-29 13:46:29 -08:00
Alexander Morozov e98c08a88f Rewrite TestRunNetHost to compare namespaces
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-29 13:10:30 -08:00
Alexander Morozov 74ee405a27 Fix done messages and error message for ipc tests
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-29 13:10:16 -08:00
Jessie Frazelle 7156fb2442 Merge pull request #9796 from LK4D4/fix_test_daemon
More graceful stop for testing daemon
2014-12-29 10:01:32 -08:00