Commit Graph

469 Commits

Author SHA1 Message Date
78fee01e67 Fix bug in attach handling for docker exec. Add docs for 'docker exec' feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: d130c10ab78417ebf64284c2a399304767446c88
Component: engine
2014-09-15 16:59:05 +00:00
b0ee16aad4 Import nsenter in docker.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: e1cf95b593a57e0c8f15d50bb3e5e8ccfb55defa
Component: engine
2014-09-15 16:59:05 +00:00
a9173e0a9b Adding 'exec' command to remote API and CLI.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 985d57958675ee11e23070e009605c8968d547cf
Component: engine
2014-09-15 16:59:03 +00:00
a11625614e Adding support for docker exec in daemon.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 5130fe5d38837302e72bdc5e4bd1f5fa1df72c7f
Component: engine
2014-09-15 16:57:52 +00:00
f867da582c Adding Exec method to native execdriver.
Modified Attach() method to support docker exec.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: f3c767d798f945192d32441cf624bdd54e746b74
Component: engine
2014-09-15 16:57:52 +00:00
560885c335 Merge pull request #7698 from tamsky/tune2fs_base_filesystem
use tune2fs to disable ext4 mount counts and mount intervals
Upstream-commit: a10a86d437148fe93c0ad128a233f42b17b22700
Component: engine
2014-09-15 15:42:52 +03:00
eb7e1f51d1 Merge pull request #8010 from LK4D4/fix_ps_s_hang_#7999
Fix ps -s hang
Upstream-commit: c751e1739d56e38aa9a813c369d78c6dbdc37b07
Component: engine
2014-09-15 13:54:29 +03:00
921f58e1dd Merge pull request #8014 from jfrazelle/8012-prevent-container-names-starting-dash
Ensure container names start with a-zA-Z0-9
Upstream-commit: da4dba2e8c9866219ad99308d2d503a5aae634ec
Component: engine
2014-09-12 23:15:16 +03:00
a8bfc34d1d Ensure container names start with a-zA-Z0-9
Closes #8012.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: aa2af817bee123827f4a857555db8fea5e01e7d7
Component: engine
2014-09-12 10:45:07 -07:00
7af74b4383 Use unlocked version of changes for GetImage
Fixes #7999

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 82bdd88e9c9db40ee8072f7c4c2832dfb3f73823
Component: engine
2014-09-12 11:44:51 +04:00
8627c41d84 Use defined variable
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 555ce0cb54943dab39f16582fc1923467e42af14
Component: engine
2014-09-12 11:42:12 +04:00
06ff531f43 Fix my own comments from #7927
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 41e9e93e27ccd637d9490412622529bdc7d7b8ff
Component: engine
2014-09-12 10:05:07 +04:00
9e31fe0a00 Fix an issue where already allocated ports would not trigger an error.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 3b6a29b81a5280187b3d03c91950cf93f7e263ec
Component: engine
2014-09-12 09:51:14 +04:00
2bf1cd4824 Merge pull request #7963 from jfrazelle/7845-remove-image-fail-dont-untag
Failing to remove an image, will not remove the image name/tag.
Upstream-commit: 32b5d145faac9013f9f78adfe3bb2a171d818863
Component: engine
2014-09-11 18:06:18 -07:00
ad8c137992 Removing an image that fails, also removes the image name/tag.
Fixes #7845 and #7801, and a real pain point I had :)

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: b2efdc538de47d37718b8972cd6703be32fc23c2
Component: engine
2014-09-11 11:29:25 -07:00
f59e13d587 Merge pull request #7202 from timbot/add-registry-mirror-flag
Add daemon flag to specify public registry mirrors
Upstream-commit: ed7fb3bbdaa5cbce2563567eaa4cef67fc172270
Component: engine
2014-09-11 11:11:01 -07:00
0d5a02c8f6 Merge pull request #7955 from LK4D4/ignore_delete_err_on_unmap_#7954
Deallocate port before trying to delete iptables chain
Upstream-commit: 25f7840993b9f4ae47b900fcbde67fcd86d537ee
Component: engine
2014-09-09 17:41:26 -07:00
765de5955d Merge pull request #7897 from LK4D4/refactoring_net_mode
Add IsPrivate method for NetworkMode
Upstream-commit: f9c345ddfae25d5512b775968fb14ed1abb00504
Component: engine
2014-09-09 14:20:59 -07:00
53bdf11639 Add IsPrivate method for NetworkMode
This method indicates that container using private network stack

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 080ca8619172b020c7da29b46f2fe4c939bb47ca
Component: engine
2014-09-10 00:46:43 +04:00
73455edf0c Deallocate port before trying to delete iptables chain
Fixes #7954
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 2e7cf6b0cec3e5cc6f05fa5011cf7b5e49a44ae4
Component: engine
2014-09-10 00:40:46 +04:00
0b07be83cc Add daemon flag to specify public registry mirrors
Adds support for a --registry-mirror=scheme://<host>[:port]
daemon flag. The flag may be present multiple times. If
provided, mirrors are prepended to the list of endpoints used
for image pull. Note that only mirrors of the public
index.docker.io registry are supported, and image/tag resolution
is still performed via the official index.

Docker-DCO-1.1-Signed-off-by: Tim Smith <timbot@google.com> (github: timbot)
Upstream-commit: 69a75c673ccf0aebf19c7b350243f1b0cefad8be
Component: engine
2014-09-09 19:03:38 +00:00
114dd7f292 Merge pull request #7660 from rhatdan/selinux-volumes
Change default label of container volumes to shared SELinux Label
Upstream-commit: 971240696f3fd74ece726245afd60bca1f86ecbc
Component: engine
2014-09-09 11:16:19 -07:00
cf5c443ddd fix console attribute in lxc template
commit 4aa5da278f49c889d43191f82ff42d3a95266d62 moves `Console` from Command to
ProcessConfig, but missed the change in lxc_template. Therefore creating a
container with tty using lxc driver with fail with error

template: lxc:60:20: executing "lxc" at <.Console>: Console is not a field of
struct type struct { *execdriver.Command; AppArmor bool; ProcessLabel string; MountLabel string }

This changes lxc_console template to refers to `.ProcessConfig.Console`

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 4b3b54ca388cd49cd790def66fbce9af2be2f20f
Component: engine
2014-09-09 13:51:13 -04:00
2a0b4ab45f Change default label of container volumes to shared SELinux Label
Since these will be shared between containers we want to label
them as svirt_sandbox_file_t:s0.  That will allow multiple containers
to write to them.

Currently we are allowing container domains to read/write all content in
/var/lib/docker because of container volumes.  This is a big security hole
in our SELinux story.

This patch will allow us to tighten up the security of docker containers.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 73617e5e18159e5f791d2860c7857cd5dea31be4
Component: engine
2014-09-09 08:18:20 -04:00
ced73947d9 typo fix: immediatly -> immediately
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Upstream-commit: fcc7ec8073311cf9d150179895e5d0a32f4cb2e7
Component: engine
2014-09-09 01:16:19 -04:00
2ff1cc83fb fixes #7802, when api version 1.11 is json.Marshaling the container struct
Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: )
Upstream-commit: f49c3f287b0d26dc705940effa0ec03e1de7bb99
Component: engine
2014-09-08 09:30:33 -07:00
7261074190 use tune2fs to disable ext4 mount counts and mount intervals
Signed-off-by: Marc Tamsky <mtamsky@gmail.com> (github: tamsky)
Upstream-commit: d229821501d75fdb86424c3817aa6b7af8459afe
Component: engine
2014-09-05 19:32:39 -07:00
0f1377200f Merge pull request #7878 from LK4D4/fix_net_for_none
Don't initialize network for 'none' mode
Upstream-commit: 1a2a4f61abb3a5b40de70b10f39c90d7593679a5
Component: engine
2014-09-04 15:30:03 -07:00
dc74831ee4 Don't initialize network for 'none' mode
Fixes #7837

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: ba24820284a7a87642f2b668987c1627d6977ea2
Component: engine
2014-09-04 09:50:58 +04:00
05579b5900 fix typos in error messages
Signed-off-by: Ward Vandewege <ward@jhvc.com> (github: cure)
Upstream-commit: a447894946ca2ac47bf1c46f78c4839c75fd740d
Component: engine
2014-09-03 13:12:10 -04:00
e9ab736d16 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 76212635b594d4472dd8d5b2e071fac416addbe7
Component: engine
2014-09-03 11:36:21 +03:00
13e3017817 Use State as embedded to Container
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: e0339d4b88989a31b72be02582eee72433d2f0ec
Component: engine
2014-09-03 00:01:11 +04:00
0886b9cbe5 Update mount struct with reference
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 688741df31396ece5f72cbc5ecc0250b3d06a8bc
Component: engine
2014-09-01 15:18:30 -07:00
559392405c Rename 'StdConfig' to 'StreamConfig'.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 3a7e07355a1ad67f71ee4255e06526186fd48f7a
Component: engine
2014-09-01 14:31:01 -07:00
a7e2cb4124 Refactoring execdriver.Command and Container structs to support 'docker exec' and other
similar features in the future.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 4aa5da278f49c889d43191f82ff42d3a95266d62
Component: engine
2014-09-01 14:30:16 -07:00
94c61e97d5 Merge pull request #7812 from erikh/fix_top
docker top: fix command when multiple arguments are supplied
Upstream-commit: 388ed88042b54b3e0fff7096c1749f2bfc2c7e40
Component: engine
2014-09-01 11:31:38 -07:00
c382a20d9b docker top: fix command when multiple arguments are supplied
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 394a6d3154fe810565ddc5619447c8a82e7ce38c
Component: engine
2014-08-31 01:18:15 -07:00
fe6985381c Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 16e850fe3ea42f5103c9a11f3db17d11dc4f6ada
Component: engine
2014-08-30 21:43:48 +04:00
76ca127323 Merge Container and State mutexes
Resolved all deadlocks and fixed race between kill and
monitor.resetContainer
Fixes #7600

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 517ba44e3742c39c4c3fc249b8c40e9b7ddd845f
Component: engine
2014-08-29 12:56:04 +04:00
b36a54587e builder: fix references to jobs in daemon, make builder a first class
package referring to evaluator

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1ae4c00a19edb7d3b41c050489e56339833d8e01
Component: engine
2014-08-27 18:52:30 -07:00
364fb8763b Merge pull request #7677 from erikh/update_hosts_linked_containers
Update /etc/hosts when linked container is restarted
Upstream-commit: 2a5e29adc62b0a45e7548c51e5cebc4855d54b48
Component: engine
2014-08-27 19:54:09 -07:00
a040de5fce Merge pull request #7672 from cpuguy83/cleanup_volumes_from
Cleanup: applyVolumesFrom
Upstream-commit: 77eefbc68894c77862608632822619abfc0c58d6
Component: engine
2014-08-27 19:43:16 -07:00
ac32065d5c Update /etc/hosts when linked container is restarted
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 450740c891c60dda15b7abe29f35b8e142c2c40e
Component: engine
2014-08-27 18:23:41 -07:00
04c32fc20e Skip "no chain" error on deleting chain in Unmap
Fixes #6904
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: bd049b3800b967bba06d03fd23ab135c51467ae3
Component: engine
2014-08-27 20:24:27 +04:00
054561d764 Cleanup: applyVolumesFrom
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 7495fbc0e3f23c932562cb02ea6e7df204d29dfa
Component: engine
2014-08-26 20:52:58 -04:00
b00ca614f6 Merge pull request #7744 from LK4D4/fix_race_cleanup_start_#6904
Fix race condition between cleanup and Start
Upstream-commit: c4a190db0c7020ee39672421d1bbca3678f86683
Component: engine
2014-08-26 14:17:11 -04:00
f5f64f68ea Merge pull request #7642 from LK4D4/style_fixes
Style fixes for daemon package
Upstream-commit: 55f7dd8198549b704089a51662e3c511d028706c
Component: engine
2014-08-26 10:59:05 -07:00
ff69012bd1 Merge pull request #7702 from LK4D4/fix_panic_on_bad_device_#7701
Handle error from GetDevice early
Upstream-commit: 89f64712faecddbfd92c7bfe6612dd5890c966dd
Component: engine
2014-08-26 10:53:40 -07:00
62eb5165d1 Fix race condition between cleanup and Start
There was problem when Start might be before cleanup

Fixes #6904

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 12ff89a3901cd2debf13e7ccc3a1a780380e4dd9
Component: engine
2014-08-26 20:57:12 +04:00
6eedef59d9 Remove redundant elses
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 698392cb512ba0c85e69a669f115d67c1d50cb98
Component: engine
2014-08-26 09:28:54 +04:00