Commit Graph

7903 Commits

Author SHA1 Message Date
8a4635dfd2 Merge pull request #5507 from shykes/dind-maintainer
Make Jerome Petazzoni a maintainer for dind
Upstream-commit: 4d521f479b4596ffa4719c1d15eb7b3f990fa2d1
Component: engine
2014-05-02 11:25:41 -07:00
4d667fa77e Merge pull request #5529 from crosbymichael/restrict-proc
Mount /proc and /sys read-only, except in privileged containers
Upstream-commit: 1c5a3123cc6ac396656b1027504748bd8dcd65e9
Component: engine
2014-05-02 10:52:53 -07:00
14e25e7714 Merge pull request #5501 from discordianfish/add-commit-message-bp
Upstream-commit: b372c19b389340962ea86e598df1faea694a4aa6
Component: engine
2014-05-01 23:47:31 -07:00
52ce474216 Merge pull request #5536 from vmarmol/add-maintainers-libcontainer
Upstream-commit: f4b60a385cbaae045674146644294e9c55129b3f
Component: engine
2014-05-01 23:42:50 -07:00
6e316a7be9 Apply apparmor before restrictions
There is not need for the remount hack, we use aa_change_onexec so the
apparmor profile is not applied until we exec the users app.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 76fa7d588adfe644824d9a00dafce2d2991a7013
Component: engine
2014-05-01 19:09:12 -07:00
5310de4065 Merge pull request #5541 from SvenDowideit/docs-generate-all-api-docs
Force the older API docs to be generated.
Upstream-commit: b263495f6abe14185bf9761534260079f4fc5c0a
Component: engine
2014-05-01 20:58:12 -04:00
dea6c0da0b Force the older API docs to be generated.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 41db1756268376465fd92038dfba1cca7f219595
Component: engine
2014-05-02 10:46:41 +10:00
20fc057c66 Merge pull request #5521 from SvenDowideit/doc-auto-section
make sure the intermediate index.html files are generated consistently
Upstream-commit: 148e081ded30425d4e9dbafe93191722b314ad93
Component: engine
2014-05-02 10:13:18 +10:00
61922080fe make sure the intermediate index.html files are generated consistently
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 5a8ffe7ef1c33996b9032fec2cf7cb2bf64793f0
Component: engine
2014-05-02 10:08:25 +10:00
c99eb0bce3 Merge pull request #5517 from SvenDowideit/5267-make-archived-docs-hidden-but-linkable
Bring back archived remote API versions
Upstream-commit: ccbc4f24d6dfaf9bc265d05ce60257af62170bdb
Component: engine
2014-05-02 02:56:03 +03:00
491fb4c32b Bring back archived remote API versions
- git mv archived/* .
- put the links back into the summary document
- reduce the header depth by 1 so the TOC lists each API version
- update the mkdocs.yaml to render the archived API docs, but not add
  them to the menu/nav

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: de49e7c0a640aada97ace458a4e5d63f5f52d4eb
Component: engine
2014-05-02 09:47:33 +10:00
0f91626b0e Merge pull request #5524 from ostezer/docs-fix-codeblocks
Improve code/comment/output markings & display consistency
Upstream-commit: edab1bd5e5b3b179ea91e675cff6199de109558b
Component: engine
2014-05-01 19:39:06 -04:00
634dd08b53 Adding Rohit Jnagal and Victor Marmol to pkg/libcontainer maintainers.
Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
Upstream-commit: 71e3757174c3c1617d636ddd7462c39617ba5a77
Component: engine
2014-05-01 15:51:38 -07:00
4decb81304 Fix /proc/kcore mount of /dev/null
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 24e0df8136c238cb3e231b939a82058950e6eb02
Component: engine
2014-05-01 15:26:58 -07:00
6012a16a9d Mount attr and task as rw for selinux support
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3f74bdd93f08b3001f11a137210ee67a6d23c084
Component: engine
2014-05-01 15:26:58 -07:00
17870b6e20 Update restrictions for better handling of mounts
This also cleans up some of the left over restriction paths code from
before.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f5139233b930e436707a65cc032aa2952edd6e4a
Component: engine
2014-05-01 15:26:58 -07:00
2184511acc Update to enable cross compile
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 83982e8b1d0cd825e1762b5540db8ae77c34f065
Component: engine
2014-05-01 15:26:58 -07:00
7dc5aa24f0 Mount /proc and /sys read-only, except in privileged containers.
It has been pointed out that some files in /proc and /sys can be used
to break out of containers. However, if those filesystems are mounted
read-only, most of the known exploits are mitigated, since they rely
on writing some file in those filesystems.

This does not replace security modules (like SELinux or AppArmor), it
is just another layer of security. Likewise, it doesn't mean that the
other mitigations (shadowing parts of /proc or /sys with bind mounts)
are useless. Those measures are still useful. As such, the shadowing
of /proc/kcore is still enabled with both LXC and native drivers.

Special care has to be taken with /proc/1/attr, which still needs to
be mounted read-write in order to enable the AppArmor profile. It is
bind-mounted from a private read-write mount of procfs.

All that enforcement is done in dockerinit. The code doing the real
work is in libcontainer. The init function for the LXC driver calls
the function from libcontainer to avoid code duplication.

Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
Upstream-commit: 1c4202a6142d238d41f10deff1f0548f7591350b
Component: engine
2014-05-01 15:26:58 -07:00
f9d5620b8d Merge pull request #5534 from vieux/fix_apparmor_inside_container
Fix apparmor inside container
Upstream-commit: 559dc9a66a513b827cb0e4d1e3917cf1da7d8e7f
Component: engine
2014-05-01 15:25:40 -07:00
675ce830a9 skip apparmor with dind
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: de191e86321f7d3136ff42ff75826b8107399497
Component: engine
2014-05-01 22:22:08 +00:00
c63bf0bec6 Revert "add apparmor to the Dockerfile"
This reverts commit fa1e390cad4fd36683e9667795967c711a4867e3.

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: ae686c0486cf6e2c0c394c5eb7a26e7d59cf1472
Component: engine
2014-05-01 21:49:53 +00:00
c15e45a882 Merge pull request #5532 from vieux/add_apparmor_dockerfile
Add apparmor to the Dockerfile to fix dind issues
Upstream-commit: 8296125b32bf594fa0e16f9eed101ddf27dfcf5f
Component: engine
2014-05-01 15:00:48 -06:00
a24ce5fa27 add apparmor to the Dockerfile
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: fa1e390cad4fd36683e9667795967c711a4867e3
Component: engine
2014-05-01 20:51:16 +00:00
3e886ab13d Merge pull request #5457 from tiborvass/5423-bridge-ip
Fix bridge ip comparison
Upstream-commit: 20bcb80f40db3fa18f285cccb89096829c426dda
Component: engine
2014-05-01 11:56:47 -07:00
5669a18570 Merge pull request #5528 from crosbymichael/drop-capsyslog
drop CAP_SYSLOG capability
Upstream-commit: ab0518bfe89c81d2486fff2166a0049a32dfa01a
Component: engine
2014-05-01 11:52:08 -07:00
d33d261bde drop CAP_SYSLOG capability
Kernel capabilities for privileged syslog operations are currently splitted into
CAP_SYS_ADMIN and CAP_SYSLOG since the following commit:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce6ada35bdf710d16582cc4869c26722547e6f11

This patch drops CAP_SYSLOG to prevent containers from messing with
host's syslog (e.g. `dmesg -c` clears up host's printk ring buffer).

Closes #5491

Docker-DCO-1.1-Signed-off-by: Eiichi Tsukata <devel@etsukata.com> (github: Etsukata)
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: cac0cea03f85191b3d92cdaeae827fdd93fb1b29
Component: engine
2014-05-01 11:43:55 -07:00
ec54d1dc2d Merge pull request #5515 from crosbymichael/refactor-libcontainer2
Remove CommandFactory and NsInit interface
Upstream-commit: fe4a25546a434eb0299bdc7f61a3cfcc3752fb33
Component: engine
2014-05-01 11:41:54 -07:00
597bc460ee Merge pull request #5526 from shykes/pr_out_beam_add_simple_framing_system_for_unixconn
Upstream-commit: 10a50fcd8f3a12bec30eba598b5127cc89432dda
Component: engine
2014-05-01 11:06:14 -07:00
a4471696ab beam: Add simple framing system for UnixConn
This is needed for Send/Recieve to correctly handle borders between
the messages.

The framing uses a single 32bit uint32 length for each frame, of which
the high bit is used to indicate whether the message contains a file
descriptor or not. This is enough to separate out each message sent
and to decide to which message each file descriptors belongs, even
though multiple Sends may be coalesced into a single read, and/or one
Send can be split into multiple writes.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 24f9187a0467ca66c30e26c3d9e3ee58daeb720f
Component: engine
2014-05-01 11:06:01 -07:00
effc835e97 Merge pull request #5092 from LK4D4/timestamp_for_docker_logs_#1165
Timestamps for docker logs.
Upstream-commit: c42db412b69be4f81319561e20923cf786c84a5d
Component: engine
2014-05-01 10:32:34 -07:00
6a260a1e42 Timestamps for docker logs.
Fixes #1165
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: d1297feef8b124e69efc99a58294f498ecb8c022
Component: engine
2014-05-01 20:40:36 +04:00
3db0ad0993 Improve code/comment/output markings & display consistency
This PR aims to increase the consistency across the docs for
code blocks and code/comment/output markings.

Rule followed here is "what's visible on the screen should be reflected"

Issue:

 - Docs had various code blocks showing: comments, commands & outputs.
 - All three of these items were inconsistently marked.

Some examples as to how this PR aims to introduce improvements:

1. Removed `> ` from in front of the "outputs". Eg,
`    > REPOSITORY                 TAG       ID              CREATED` replaced with:
`    REPOSITORY                 TAG       ID              CREATED`.

2. Introduced `$` for commands. Eg,
`    sudo chkconfig docker on` replaced with:
`    $ sudo chkconfig docker on`

3. Comments:
`    > # ` replaced with:
`    # `.

> Please note:
> Due to a vast amount of items reviewed and changed for this PR, there
> might be some individually incorrect replacements OR patterns of incorrect
> replacements. This PR needs to be reviewed and if there is anything missing,
> it should be improved or amended.

Closes:
https://github.com/dotcloud/docker/issues/5286

Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: f87a97f7df838742a602f1984f4552b803e3f92d
Component: engine
2014-05-01 17:52:01 +03:00
8195178553 Merge pull request #5519 from SvenDowideit/remove-rst-docs
remove rst/sphinx documentation
Upstream-commit: 51a39563fa31ddde9742b9e8a9b847b7c0307c73
Component: engine
2014-05-01 16:33:54 +03:00
2ce48c01a4 Merge pull request #5516 from SvenDowideit/docs-meta-rendering
add page_description and page_keywords md meta to mkdocs html template
Upstream-commit: c52bb90d037d7be4623df923582a12f41cb91820
Component: engine
2014-05-01 16:16:48 +03:00
549ce4c50e remove rst/sphinx documentation
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: adf04681b4bd7293675b77b2397d87a5361b383b
Component: engine
2014-05-01 15:31:58 +10:00
99009c27fd add page_description and page_keywords md meta to mkdocs html template
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 8ae53ef167d684ed41fd9bd1a04f7a70a1ad20b6
Component: engine
2014-05-01 12:41:57 +10:00
e7b52bc191 Merge pull request #5514 from vbatts/vbatts-save_typo
docker save: typo reference image, not container
Upstream-commit: 9da75eb4df082ce0be68cab55b862f817c73166b
Component: engine
2014-04-30 19:00:22 -07:00
c94cce9900 Remove container.json from readme
No need to duplicate this information when we already have a
container.json file in the root of libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: d0bee7939482b982462c5848f24b2e5e9ad897ea
Component: engine
2014-04-30 18:52:15 -07:00
c808aa7e58 docker save: typo reference image, not container
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 93f8e277de63b4bcf6dc82b8c4b7abf81d614355
Component: engine
2014-04-30 21:51:03 -04:00
b43bfc67a6 Make native driver use Exec func with different CreateCommand
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: da0d6dbd7b5b429b79ae4ea22957e8a14b4ca1ec
Component: engine
2014-04-30 18:49:24 -07:00
c0992a66d2 Fix execin with environment and Enabled support
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: aa9705f832d847d6e6ce76e19f3c952c194c167e
Component: engine
2014-04-30 18:24:47 -07:00
4b320ae74d Integrate new structure into docker's native driver
This duplicates some of the Exec code but I think it it worth it because
the native driver is more straight forward and does not have the
complexity have handling the type issues for now.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 60e4276f5af360dd3292e22993c0c132a86edc2e
Component: engine
2014-04-30 18:20:01 -07:00
8cf0bc757c Remove command factory and NsInit interface from libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 176c49d7a9e5a81b6c80e18dea84864148360597
Component: engine
2014-04-30 17:55:15 -07:00
3b07a6b498 Export more functions from libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: b6b0dfdba7bda13d630217830423580c3152899d
Component: engine
2014-04-30 17:18:07 -07:00
04ee258620 Split term files to make it easier to manage
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: aecb9c39ab0eb5f09ebab40001fe0ff639ef617b
Component: engine
2014-04-30 17:04:24 -07:00
2b44341c25 Export syncpipe fields
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: a3e96abb5aacaa763f3f9205316dd0aef1977f16
Component: engine
2014-04-30 17:02:45 -07:00
3c350a7bfd Merge pull request #5511 from crosbymichael/refactor-libcontainer
Refactor: remove statewriter type and all callback for process start
Upstream-commit: 26ac05c8bce47fd37c35e43b98cdbcfb65a5c9bb
Component: engine
2014-04-30 16:50:57 -07:00
47e64912c0 Merge pull request #5512 from crosbymichael/set-freezer
Add ability to set cgroups freezer
Upstream-commit: be013c7820747af5e3696ad306b817aa437dd3c4
Component: engine
2014-04-30 16:50:01 -07:00
4188748bd6 Add ability to set cgroups freezer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5f6fda8cfd05dec002894d3e2214a04a58b62bed
Component: engine
2014-04-30 16:07:12 -07:00
e0c447076a Remove statewriter interface, export more libcontainer funcs
This temp. expands the Exec method's signature but adds a more robust
way to know when the container's process is actually released and begins
to run.  The network interfaces are not guaranteed to be up yet but this
provides a more accurate view with a single callback at this time.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f1104014372e71e1f8ae7a63d17e18de5e2fa93a
Component: engine
2014-04-30 15:52:40 -07:00