Commit Graph

544 Commits

Author SHA1 Message Date
e22789790c Merge pull request #9174 from dqminh/docker-exec-env
Set correct env variables for `docker exec` commands
Upstream-commit: 9a917e732c8f84f365b36a5a92bdb1f546a7e4d1
Component: engine
2014-11-20 13:31:51 -08:00
f435c304cd Merge pull request #8251 from duglin/Issue2333
Add support for ENV of the form: ENV name=value ...
Upstream-commit: 58b6f31a7a3157b5ece418da0a976a28dae9841d
Component: engine
2014-11-20 13:12:24 -08:00
9a648e0fc7 test case for preserving env in exec session
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 2bceaae42399ce33e8c724d1ac435eca6759637b
Component: engine
2014-11-20 13:05:37 -05:00
5dafd01fe8 Add support for ENV of the form: ENV name=value ...
still supports the old form: ENV name value

Also, fixed an issue with the parser where it would ignore lines
at the end of the Dockerfile that ended with \

Closes #2333

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1314e1586f8cd6201c16161eb960a743c727946b
Component: engine
2014-11-20 09:54:28 -08:00
21506f31ee Merge pull request #9226 from crosbymichael/container-net-test
Add test for --net container:<id>
Upstream-commit: 739d917d7094db822ecfe927e1e934c3c8ec4047
Component: engine
2014-11-19 17:57:45 -08:00
f35e467fb4 Merge pull request #9211 from mtesselH/login
Fixed a bug - no panic anymore when logining in without TTY
Upstream-commit: d4ca9e5cce2ff7e08750123609df1864e0befdcf
Component: engine
2014-11-19 17:52:35 -08:00
259b05fa1e Add test for --net container:<id>
This adds an integration test for checking that the network namespace
fds are the same when a container joins another container's network
namespace.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 71209f75791fdc1a2124682f50cd00a413ddb143
Component: engine
2014-11-19 17:43:04 -08:00
6e30644aa7 Merge pull request #9251 from tonistiigi/use-format-logging-functions
Fix misuses of format based logging functions
Upstream-commit: eb3bbde6d18bb35774cd3ab2c6eba0016f679d2b
Component: engine
2014-11-19 15:25:42 -08:00
a3eaed6ca5 Fix misuses of format based logging functions
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 6705477673be7c303369778f6f288ee600ce3893
Component: engine
2014-11-19 23:59:02 +02:00
f428978f5b Fix deleteImages() helper for multiple names
Pass every image name as separate argument.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: bbb245defe670f4fd9b9159b154e0ba5aa93ec87
Component: engine
2014-11-19 23:42:16 +02:00
865600707c Make sure integration-cli test clean up
Common patterns:
- Multiple images were built with same name but only one cleanup.
- Containers were deleted after images.
- Images not removed after retagging.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: da3d3b97ebe1e6fe1254367521c725ca12a5e61d
Component: engine
2014-11-19 23:41:46 +02:00
16ad3a4d02 Fixed a bug - no panic anymore when logining in without TTY
Fixes #8956

Signed-off-by: Marianna <mtesselh@gmail.com>
Upstream-commit: e6fd57b90bcdd3b0105fa5c7d17a64332f829ded
Component: engine
2014-11-17 19:41:27 -08:00
569d615f97 Merge pull request #9204 from jfrazelle/9056-rmi
Fix for rmi throws error "no such id".
Upstream-commit: 17dfa126baabb7300e4a5193689cde01ece24747
Component: engine
2014-11-17 18:08:52 -08:00
b3efa18c2e Add test for bug (9056) where rmi -f fails with "no such id".
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: a0605107d713f7f8a25277b06369134d17781077
Component: engine
2014-11-17 15:12:55 -08:00
884eb7da74 Fix the documentation and integration test for container resize
Closes #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 91fb9b2f5a07232cecfcde38a98c3ec6410239b7
Component: engine
2014-11-17 18:38:08 +00:00
40988ed79f Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2facc0467336a80f48c765dbdbd803055a431aa9
Component: engine
2014-11-15 09:00:48 -08:00
09b8238fe6 Allow IPC namespace to be shared between containers or with the host
Some workloads rely on IPC for communications with other processes.  We
would like to split workloads between two container but still allow them
to communicate though shared IPC.

This patch mimics the --net code to allow --ipc=host to not split off
the IPC Namespace.  ipc=container:CONTAINERID to share ipc between containers

If you share IPC between containers, then you need to make sure SELinux labels
match.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 497fc8876ede9924f61c0eee4dfadd71e5d9f537
Component: engine
2014-11-12 11:29:58 -05:00
0bfbaf6019 Cleanup some integration-cli output
I noticed a few things that were bugging me in the output
of the integration-cli tests.
- one of the tests used println to stdout so we had garage sent to the screen
- some of the test, in their final log message, didn't include the name of
  the group/file e.g.  daemon - run,iptables   was just   run,iptables

And yes, I noticed this because I'm anal :-)  but also because we should keep
the output of the tests as clean as possible so its easy to spot it when
things go bad.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0cef21cfba5b06ce7bd5d6b68865a9df0aca95fc
Component: engine
2014-11-11 08:44:32 -08:00
1ddc5019e6 Merge pull request #8726 from krallin/failed-start-breaks-volumes-from
Fix: a failed Start() breaks --volumes-from on subsequent Start()'s
Upstream-commit: 2a517fe103193e09474a4f67b60c09205042261e
Component: engine
2014-11-11 10:49:33 -05:00
8ee09ed8c7 Merge pull request #9014 from LK4D4/fix_parent_failing
Not fail on updating parent links
Upstream-commit: 84f25414c18f726bccac10710f5971f5c5d822cd
Component: engine
2014-11-10 12:53:16 -08:00
0cba5a8261 Merge pull request #8716 from duglin/Issue8331
Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Upstream-commit: 4fcd3dd7488ba779c48557e90598c81c94bf74e4
Component: engine
2014-11-10 13:03:57 -07:00
507970cff9 Fix: Failed Start breaks VolumesFrom
Running parseVolumesFromSpec on all VolumesFrom specs before initialize
any mounts endures that we don't leave container.Volumes in an
inconsistent (partially initialized) if one of out mount groups is not
available (e.g. the container we're trying to mount from does not
exist).

Keeping container.Volumes in a consistent state ensures that next time
we Start() the container, it'll run prepareVolumes() again.

The attached test demonstrates that when a container fails to start due
to a missing container specified in VolumesFrom, it "remembers" a Volume
that worked.

Fixes: #8726

Signed-off-by: Thomas Orozco <thomas@orozco.fr>
Upstream-commit: fb62e184412b6d2bf38975a7051738f05b1f413d
Component: engine
2014-11-10 17:32:16 +01:00
2f7c6a8c08 Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2e482c86bc14ddd4cfa45281dcf8f9ca141c9f14
Component: engine
2014-11-07 13:58:05 -08:00
8f685d0d4a Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b83fc07d88175c32bb46368a07a9c9e277b22392
Component: engine
2014-11-06 15:30:23 -08:00
951245c785 Merge pull request #8711 from duglin/Issue8160
Add import/pull events to the stream
Upstream-commit: 734419e9c7541286e94f28c90d5ebea3a627aae5
Component: engine
2014-11-06 14:29:02 -08:00
7c60de6972 Add import/pull events to the stream
Closes #8160

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ef7415258ba5195af7a890d1d52214b3a181a379
Component: engine
2014-11-06 12:12:41 -08:00
973d8d4d59 Merge pull request #8977 from LK4D4/vet_fixes
Fix vet errors
Upstream-commit: 546884fd20b0a3e7692f1edf5415b48df65a2e7f
Component: engine
2014-11-06 11:59:05 -08:00
811492e0cb See #8379 - if the container doesn't start I added code to make sure that if no other processing sets the container.exitCode to a non-zero value when we make sure its done before we return. I also made sure that while trying to start the CMD/ENTRYPOINT, if it fails, then we set the container.exitCode to the exitStatus from the exec().
Closes #8379

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 69a5b827dcf01a6de5949a161606058017014cdc
Component: engine
2014-11-05 18:23:42 -08:00
12147a008d Close stdin after execution with docker exec -i
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 165624062e1ac105b6e45beba51cec6439918f11
Component: engine
2014-11-05 15:12:24 -08:00
07c8c2eea7 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 18d9f1978b311ff9cadce9f0237313db14502f9f
Component: engine
2014-11-05 08:26:22 -08:00
1ce2377d8b Merge pull request #8390 from MalteJ/set-macaddress
Adding docker-cli run param to set MAC address
Upstream-commit: 9eb8fcd58a5dc0a6fd812fc2bdc410f36dd63cc0
Component: engine
2014-11-04 07:54:59 -08:00
9bfa240ca3 Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix
On daemon shutdown iptables cleanup successfully
Upstream-commit: b8ab729ae63e3b21105ee00478995d8d81dc7d3d
Component: engine
2014-11-03 18:29:51 -05:00
d3c1cd34ce Merge pull request #8739 from duglin/CleanupDockerIgnores
Do some cleanup on .dockerignore paths
Upstream-commit: a85f58719f29f76f465747d095c85dbb8ba69d06
Component: engine
2014-11-03 16:05:24 -05:00
b9029ea913 Fix deadlock in ps exited filter
Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 03ea2166b66632ee7cdd824d7acd87b15c9bccb2
Component: engine
2014-11-03 10:51:03 -08:00
590a54ca61 enhancing set-macaddress docu
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: 971fc2253af77ae4a22a3741fff51d84cd9bc697
Component: engine
2014-11-03 11:43:27 +01:00
f115554d46 Do some cleanup on .dockerignore paths
While working on the fix for #8330 I noticed a few things:
1 - the split() call for the .dockerignore process will generate a blank
    "exclude".  While this isn't causing an issue right now, I got worried
	that in the future some code later on might interpret "" as something bad,
	like "everything" or ".".  So I added a check for an empty "exclude"
	and skipped it
2 - if someone puts "foo" in their .dockerignore then we'll skip "foo".
    However, if they put "./foo" then we won't due to the painfully
	simplistic logic of go's filepath.Match algorithm.  To help things
	a little (and to treat ./Dockerfile just like Dockerfile) I added
	code to filepath.Clean() each entry in .dockerignore.  It should
	result in the same semantic path but ensure that no matter how the
	user expresses the path, we'll match it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c0f0f5c9887032c606750b645001829d9f14f47c
Component: engine
2014-11-02 11:29:46 -08:00
c0897a4514 Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: f2df38050e019c0db265e7c3e38ee0de8948ca77
Component: engine
2014-11-01 15:35:09 +01:00
b972337ce2 adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: fd774a818c7d8942922b4f74eabd2a4e14094e1a
Component: engine
2014-10-31 23:06:30 +00:00
72f16e522e Fix panic on slow log consumer.
Fixes #8832

All stdio streams need to finish writing before the
connection can be closed.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: c2cf97a0747976c2307e991028dc703b2b430d80
Component: engine
2014-10-30 22:24:57 +02:00
4b66ac1426 Generalize consumeSlow and add stop support
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 417e48e4a00c891e8fe5614ac6a1ef12de951f72
Component: engine
2014-10-30 21:11:33 +02:00
55acba12a1 Move consumeSlow() under test utils
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 8a81c462722c7158e481f974f628843e7c172158
Component: engine
2014-10-30 20:55:08 +02:00
842e60dcd8 Merge pull request #8046 from vbatts/vbatts-archive_preserve_hard_links
archive: preserve hardlinks in Tar and Untar
Upstream-commit: 73057168fa6f8852c52cdc92f790446da865f2e7
Component: engine
2014-10-29 22:04:23 +02:00
87d83cfa00 archive: preserve hardlinks in Tar and Untar
* integration test for preserving hardlinks

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Upstream-commit: f9f80443638fc2d703ee6205c8ef3db8e38db9a3
Component: engine
2014-10-29 14:52:52 -04:00
08749b6912 Merge pull request #8571 from ncdc/3631-stdout-premature-eof
Fix stdout premature EOF
Upstream-commit: f936a10d8048f471d115978472006e1b58a7c67d
Component: engine
2014-10-29 11:36:32 -07:00
6ab2c0d2ce Add test for #8307.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: d98b117962a7178154e775b8b283744841a10e3b
Component: engine
2014-10-29 10:59:20 -07:00
b3f73f86dd builder: Restore /bin/sh handling in CMD when entrypoint is specified with JSON
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 24545c18c35620c211003561dc482d66ee6d0306
Component: engine
2014-10-27 21:50:22 +00:00
8aa0b668bd builder: whitelist verbs useful for environment replacement.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4e74cd498b66e494b3336118a19c02000b282251
Component: engine
2014-10-27 17:38:25 +00:00
a3019fc24f builder: handle escapes without swallowing all of them.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: be49867cab663b5bdcf7804f3d2504f056db9db1
Component: engine
2014-10-27 17:38:24 +00:00
9609160b54 Merge pull request #8321 from erikh/ui_save_output
docker save: Do not save to a terminal.
Upstream-commit: 350e1b783d4deafbb62ede4d17df37dbaffa373a
Component: engine
2014-10-24 19:37:14 -04:00
bd2b080653 Merge pull request #8744 from erikh/empty_entrypoint_inheritance
builder: some small fixups + fix a bug where empty entrypoints would not override inheritance.
Upstream-commit: c681bea0620d24e9df370147a13a98f94bc66ee0
Component: engine
2014-10-24 15:31:15 -07:00