Commit Graph

584 Commits

Author SHA1 Message Date
5231d38261 Fix permissions on ADD/COPY
Fix a regression introduced in PR#9467 when a single file was added or
copied.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: cfc24769a26e825e4267cbfdd59af807e27508b9
Component: engine
2014-12-10 11:09:03 -08:00
1d39a69298 Forbid client piping to tty enabled container
Forbid `docker run -t` with a redirected stdin (such as `echo test |
docker run -ti busybox cat`). Forbid `docker exec -t` with a redirected
stdin. Forbid `docker attach` with a redirect stdin toward a tty enabled
container.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 67e3ddb75ff27b8de0022e330413b4308ec5b010
Component: engine
2014-12-09 14:30:49 -08:00
b4787aa54e Add test for exec tty stdin close
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 243a640d3e593ee11e31ac55a4df8c887c2b09c9
Component: engine
2014-12-09 14:30:49 -08:00
bb5a33c82a Merge pull request #9356 from cc272309126/fix-exec-paused-container
Fix the issue that when docker exec a paused container, it will always
Upstream-commit: bb24f99d741cd8d6a8b882afc929c15c633c39cb
Component: engine
2014-12-09 11:01:44 -08:00
9923dcade2 Merge pull request #9467 from icecrime/9401-restrict_add_chown_scope
Reduce permissions changes scope after ADD/COPY
Upstream-commit: 64ebffe7b6e4a6732b3b6f56585bc8d01f4f8ed0
Component: engine
2014-12-09 10:40:23 -08:00
3890e00172 Running a container that links to a container with --net host
should throw an error.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6743be44ca9006cb7ca26cd3d8410877727a6313
Component: engine
2014-12-08 11:33:18 -08:00
15957abc33 Reduce permissions changes scope after ADD/COPY
Permissions after an ADD or COPY build instructions are now restricted
to the scope of files potentially modified by the operation rather than
the entire impacted tree.

Fixes #9401.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f3cedce3608afe7bd570666a7fc878ab85c7bc03
Component: engine
2014-12-04 17:16:22 -08:00
52bfe6086a Make 'docker build' send non-err output to stdout
Right now 'docker build' will send:
   Sending build context to Docker daemon
to stderr, instead of stdout.  This PR fixes that.

I looked in the rest of api/client/commands.go for other cases
that might do this and only one jumped out at me:
  https://github.com/docker/docker/blob/master/api/client/commands.go#L2202
but I think if I changed that to go to stdout then it'll mess people up
who are expecting just the container ID to be printed to the screen and
there is no --quiet type of flag we can check.

Closes #9404

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5c91bb93a7e35b2d443090cabc7ec0a2ca59b6ee
Component: engine
2014-12-04 14:06:40 -08:00
2b487e0de2 Fix the issue when docker exec a paused container, it will always hang.
Add the test case of this issue.

Docker-DCO-1.1-Signed-off-by: Chen Chao <cc272309126@gmail.com> (github: cc272309126)
Upstream-commit: 1bb02117db80e75f406f6c63d8d50680c1569019
Component: engine
2014-12-05 03:10:44 +08:00
61a90c5a2b Run 'go vet' on integration-cli.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 4ee3a318a1f43f35a8c6ec8b6b73db5ea8824de9
Component: engine
2014-12-03 18:45:51 -08:00
9442c6a19e Remove unnessary abstraction deepEqual
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: fa753e67ae2bf573c9dfb1da1e1135c5ef5ef415
Component: engine
2014-12-03 17:52:06 -08:00
2a07b18ca1 Remove unnecessary abstraction nLines
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 02a021119fb2b3e051b98817831a8c1a8a9fd464
Component: engine
2014-12-03 17:47:28 -08:00
4cd694cddb cleanup: remove startCommand function, only used once, and
unecessary abstraction.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7ba9a18ade7393d942d995d34a92d757ef4af0b7
Component: engine
2014-12-03 17:43:26 -08:00
b108f27ddc Fix tests with old cmd function.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e201d5bcd46a3dcb70dd6b6e23ee375e4b5b5f40
Component: engine
2014-12-03 15:53:19 -08:00
e1ce0e0de9 Merge pull request #9089 from cpuguy83/8942_create_volumes_on_create
Initialize volumes when container is created
Upstream-commit: 67fda331973fdd23f3da79588ea899dc577f46e8
Component: engine
2014-12-03 15:42:09 -08:00
fdf7191cae Merge pull request #9435 from cpuguy83/9414_fix_exec_api_error_no_cmd
Check for no `Cmd` on exec create endpoint
Upstream-commit: 50445e4d0c622837f1dd9bd5b3810d3b309b7d18
Component: engine
2014-12-02 10:28:44 -08:00
9254581bd3 Try other port on any error from Map
Sometimes other programs can bind on ports from our range, so we just
skip this ports on allocation.

Fixes #9293
Probably fixes #8714

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a00a1a1fca020d21cb677439160e018bda5c3835
Component: engine
2014-12-01 16:26:30 -08:00
67d69faf00 Check for no Cmd on exec create endpoint
Fixes #9414

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c8a3d31332074ddc226086ff1f0c042b6e120232
Component: engine
2014-12-01 17:54:15 -05:00
539a7bfbcc Merge pull request #9378 from LK4D4/change_breakout_detection
Change symlink breakout detection logic in archive package
Upstream-commit: 8ddb42fbfd692a9888c1e8e9ebacefed62e123ef
Component: engine
2014-12-01 19:23:18 +02:00
154f28d3d7 Fixes race condition in test. Closes #9389.
Signed-off-by: Emily Maier <emily@emilymaier.net>
Upstream-commit: 9c5e61c24c490ca3e9d52855ee26d4a8e9032fb2
Component: engine
2014-11-28 13:48:50 -05:00
b86ab101dc Change path breakout detection logic in archive package
Fixes #9375

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: be5bfbe2217905ba129588fe17264b96c866e26d
Component: engine
2014-11-28 09:44:47 -08:00
cd036c2490 Increase memory limit in test cases
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
Upstream-commit: 64fd3e89c7f6164b5522b5e611e7daf4a2bdae9c
Component: engine
2014-11-27 03:22:16 +09:00
484c26692a fix where cmd function dne
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 8635b0248a1166a48dbd0fbe32df7b19f4ccea62
Component: engine
2014-11-25 18:34:08 -08:00
3253386751 Merge pull request #9208 from duglin/Issue8703
Add support for docker exec to return cmd exitStatus
Upstream-commit: 00c2a8f323548b7d0aa54cfd10a594dd93ddbed0
Component: engine
2014-11-25 18:03:51 -08:00
039ddfff8b Merge pull request #8893 from vieux/filter_events
Events filtering (daemon side)
Upstream-commit: 9160e01cefbc4a7dd2ad38167c928c959dde3fad
Component: engine
2014-11-25 17:52:27 -08:00
c28ef478d3 Add support for docker exec to return cmd exitStatus
Note - only support the non-detached mode of exec right now.
Another PR will add -d support.

Closes #8703

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 90928eb1140fc0394e2a79d5e9a91dbc0f02484c
Component: engine
2014-11-25 17:49:25 -08:00
2d3f0f7b70 Test for updating hosts files via links.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 68bc8de111e4faa2a16583cd45b5c0fd253a3bba
Component: engine
2014-11-25 16:48:36 -08:00
8137d7940d Break some routines out of the mutable files test for future use
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 20575d20bad60172b9d1f40c9fe357b7c069f466
Component: engine
2014-11-25 16:46:09 -08:00
267eaf906b fix tests
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: f0f0e316aab2c8cc6e2f0124c7bde7661a15461c
Component: engine
2014-11-26 00:00:56 +00:00
09af87d0eb remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 7fbbd515b1018721e91199960d1933383a8262a1
Component: engine
2014-11-25 00:32:38 +09:00
17175863b2 Merge pull request #9188 from somaopensource/8777-fix
Fix for #8777 (continuing PR #9061)
Upstream-commit: d7626e97b61f5f8f5d585ec82d6154395a3f9404
Component: engine
2014-11-21 17:57:56 -08:00
6951abbd89 Merge pull request #9009 from a-ba/fix-export-repo
fix missing layers when exporting a full repository 
Upstream-commit: a5277764aed9e5493387a6f4caf2bb93a0a6afa3
Component: engine
2014-11-21 15:44:27 -05:00
8d3c39cea7 Merge pull request #9261 from unclejack/fix_test_tmp_cleanup
fix cleanup of /tmp in tests
Upstream-commit: 0f2de5158fe66b4906de176f90e3e6d813336450
Component: engine
2014-11-21 08:48:04 -08:00
f7e2fcdfb9 Make --tlsverify enable tls regardless of value specified
I also needed to add a mflag.IsSet() function that allows you to check
to see if a certain flag was actually specified on the cmd line.

Per #9221 - also tweaked the docs to fix a typo.

Closes #9221

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ae9bd580af55992974fcb94f73f72cc3b2257fec
Component: engine
2014-11-20 16:09:06 -08:00
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
f6afb58177 events filtering
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 7ff3b81054b028a4399c86340489fe3937049abe
Component: engine
2014-11-20 19:46:48 +00: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
14c4bd0633 integ-cli: fix cleanup in build tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: db7fded17fd984fc3c854d1e34bd8d656c3b3692
Component: engine
2014-11-20 19:38:41 +02:00
9ed67f3c2f integ-cli: fix cleanup in test which mounts tmpfs
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 98307c8faefca5c4347288af18aee4dacbf8802c
Component: engine
2014-11-20 19:37:46 +02:00
313de46eb6 Fix for #8777
Now filter name is trimmed and lowercased before evaluation for case
insensitive and whitespace trimemd check.

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Upstream-commit: 4deac03c65edf34affd66abd3ef8fb88287d2f5a
Component: engine
2014-11-20 13:36:46 +09: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