Commit Graph

962 Commits

Author SHA1 Message Date
76ec388f40 Merge pull request #14864 from ewindisch/apparmor-engine-policy
Add AppArmor policy for the docker binary
Upstream-commit: a7d84503128720612022d46f5c9c04602cb19f05
Component: engine
2015-07-22 13:56:33 -07:00
6e935ab7ff actually update deb dockerfiles
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 1fff0a5cc5503ed2af0fd0b9bf775ebd41917a44
Component: engine
2015-07-22 13:06:04 -07:00
5b6d4b1770 Allow RHEL init script to detect daemon start pid failure
If you have some kind of bogus `other_args` in `/etc/sysconfig/docker` the start script will report "started" but it's full of lies. This enhances the flow so that if the pidfile never shows up (failure to start) you get a proper failure message.

I also added dots for fun.

Signed-off-by: Jeff Minard <jeff.minard@creditkarma.com>
Upstream-commit: 6f8fdb8aa893b2d5f319d342614dd159e0c8bb83
Component: engine
2015-07-22 11:36:34 -07:00
45caf3ce23 Update init scripts to use docker daemon.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 346ce4f8d24de0db5ccc17151f2207cee10abc2e
Component: engine
2015-07-22 11:24:38 -07:00
ae18180fac Add AppArmor policy for the engine
Wraps the engine itself with an AppArmor policy.

This restricts what may be done by applications
we call out to, such as 'xz'.

Significantly, this policy also restricts the policies
to which a container may be spawned into. By default,
users will be able to transition to an unconfined
policy or any policy prefaced with 'docker-'.

Local operators may add new local policies prefaced
with 'docker-' without needing to modify this policy.
Operators choosing to disable privileged containers
will need to modify this policy to remove access
to change_policy to unconfined.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 39dae54a3f40035b1b7e5ca86c53d05dec832ed2
Component: engine
2015-07-22 14:20:50 -04:00
9f8e7b5fed Introduce a dedicated unconfined AA policy
By using the 'unconfined' policy for privileged
containers, we have inherited the host's apparmor
policies, which really make no sense in the
context of the container's filesystem.

For instance, policies written against
the paths of binaries such as '/usr/sbin/tcpdump'
can be easily circumvented by moving the binary
within the container filesystem.

Fixes GH#5490

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 87376c3add7dcd48830060652554e7ae43d11881
Component: engine
2015-07-22 11:28:32 -04:00
417958d0e1 Merge pull request #14770 from albers/completion-log-opt
Bash completion for log drivers and their options
Upstream-commit: 052b23e2901131393737829b03a7e8a37e9232f6
Component: engine
2015-07-21 19:58:12 -07:00
797e2bf06e Merge pull request #14677 from vincentbernat/fix/zsh-completion-update-4
zsh: update zsh completion for docker command
Upstream-commit: 162ae444afd9a82af4c3448654bef03fedb11d04
Component: engine
2015-07-21 19:56:03 -07:00
84681c30e3 Merge pull request #14609 from ewindisch/apparmor-policy
Move AppArmor policy to contrib & deb packaging
Upstream-commit: 380959dd68cd56e60a2ea93cd7f26c8d88135483
Component: engine
2015-07-21 08:48:02 -07:00
74cf202b4f Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 80d99236c1ef9d389dbaca73c1a949da16b56b42
Component: engine
2015-07-21 11:05:53 -04:00
0bc52bd67f Second level completions for --log-opt
Advanced completion for some log driver options:
gelf-address, syslog-address, syslog-facility.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d5aeb3398b6438ea5a1b3de4ec1e5f35d441f462
Component: engine
2015-07-21 08:25:14 +02:00
9acb0cc0fc Remove reference to CENTOS6 from generate script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 18ca5d7c0e8582bf4e31a8ca1f5c6a5dbc58d55b
Component: engine
2015-07-21 01:21:33 +02:00
d43954849c Completion: Add support for '=' in arguments to __docker_pos_first_nonflag
This solves several problems that arise from the special treatment of
"=" in Bash.
The fix was required as some log drivers have options in a key=value
form. It also addresses the --option=value and the negated boolean syntax
(--boolean=false).

Note that this is not a general fix for these problems, it is limited to
the __docker_pos_first_nonflag function.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 38acec94c49e6730ae6bdef86b85f529c1dddda6
Component: engine
2015-07-20 21:22:56 +02:00
62e6e49ea2 Driver-specific completions for --log-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: faa8b658e7e7a0e827cf7e05f64dcd2e843452ac
Component: engine
2015-07-20 20:24:01 +02:00
b663092054 Add missing log drivers to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e09d0febe644f440e95a7a87e6fdfae8104743d6
Component: engine
2015-07-20 20:13:59 +02:00
0be39dfb3a zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

 - felixr/docker-zsh-completion@a93e1cb7bd Fix completion of repositories with tags
 - felixr/docker-zsh-completion@590ea70596 Respect provided `--host` flag when invoking docker
 - felixr/docker-zsh-completion@6c557babaa Several cosmetic improvements
 - felixr/docker-zsh-completion@5b63cc591a Update completion for `inspect`
 - felixr/docker-zsh-completion@b7d8f2f7cc Order completions alphabetically
 - felixr/docker-zsh-completion@63f6a06224 Factor completion for `build`, `create` and `run`
 - felixr/docker-zsh-completion@ade49ee47f Enforce positional arguments being last
 - felixr/docker-zsh-completion@850b6b6d95 Update completion for build/commit/export/exec/history/import
 - felixr/docker-zsh-completion@01bfd8c075 Remove completion for `insert` and duplicate of `import`
 - felixr/docker-zsh-completion@c64a1d730a Update completion for `stats` to add `--no-stream` flag
 - felixr/docker-zsh-completion@5e81d78b52 Update completion for `log` to add `--since` flag
 - felixr/docker-zsh-completion@b3c146a1a2 Update completion for `run` to add `--group-add` flag
 - felixr/docker-zsh-completion@8d4f196ad8 Don't trigger expensive completion function for flags
 - felixr/docker-zsh-completion@bd5aaa124d Add completion for `--help` everywhere
 - felixr/docker-zsh-completion@3a67a0e8c4 Return appropriate status code on completion
 - felixr/docker-zsh-completion@4dfcb450ea Add Steve as a regular contributor.
 - felixr/docker-zsh-completion@996a1c6def Add completion for top-level flags
 - felixr/docker-zsh-completion@b6df75905f Ensure short/long option are not allowed twice
 - felixr/docker-zsh-completion@75b6a500a0 Complete repositories with tags only on repository match
 - felixr/docker-zsh-completion@5e6292135f Factorize completion of images/repositories/tags
 - felixr/docker-zsh-completion@1c504eb677 Handle repositories with ":"
 - felixr/docker-zsh-completion@0a05bf818b Update completion for `pause' and `unpause'
 - felixr/docker-zsh-completion@b3a63253e2 Containers name can include Swarm host

In summary:

 - Swarm support
 - Handling repositories with ":"
 - Rework how completion of images/repositories/tags work:
    - felixr/docker-zsh-completion@5e6292135f
    - felixr/docker-zsh-completion@75b6a500a0
    - felixr/docker-zsh-completion@a93e1cb7bd

The remaining changes are here to sync changes done in Docker repository
(mostly from PR #14074 and #14555, by @sdurrheimer). With some minor changes:

 - boolean flags don't complete their arguments (true/false)
 - reuse of `--host` argument is done with `$opt_arg` to avoid parsing
   error
 - build/create/run common options are factorized out
 - `--help` flag is handled differently
 - `pause` and `unpause` accepts several containers as far as I know, so
   the change is reverted
 - some more, but difficult to notice (more completion for some flags I think)

Some labels are reverted, mostly because I did the merge by copy/pasting
new options instead of modifying existing options.

This commit is partial. The way the `--help` option is handled triggered
a major change due to the way things are quoted. Those changes were
partially and programmaticaly reverted in this commit only to minimize
the changes to review. The next commit will restore the full changes.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 3a1596f0f5e004f59b0d140b728ca255206ef68f
Component: engine
2015-07-20 14:25:48 +02:00
30e998cb02 remove centos6 from rpm builder
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: af5fb9b7d0722783d6ffcc9d36e36e158d1b84b0
Component: engine
2015-07-19 14:30:48 -07:00
9b0a67a80d Updated usage information because of removed short parameters.
Signed-off-by: Robin Schneider <ypid@riseup.net>
Upstream-commit: 397de38ae68ed580dccae1421bd02bfedd4ababa
Component: engine
2015-07-16 10:44:58 +02:00
13b2b9e4b5 add tianon's suites.sh file
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 4a5fd6c0f9014456e70a369c5b31e3edb3b8d5a1
Component: engine
2015-07-15 12:48:49 -07:00
b069af9e3e Merge pull request #14555 from sdurrheimer/master
Zsh completion updates and improvements
Upstream-commit: 386f11a63dec0f918e5d118bb5835ddde56a7b41
Component: engine
2015-07-15 10:40:41 -07:00
4fb7b8e2f2 Merge pull request #14608 from vincentbernat/fix/zsh-reviewers
zsh: remove Vincent Bernat from reviewers for ZSH completion
Upstream-commit: cf09e435c843516af8bbe0460cd5e1f014c0e01a
Component: engine
2015-07-14 07:08:06 -07:00
e313011735 Several cosmetic improvements in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 91a2d9cc7d4ed47d4f255ad3d6da8295483e6a89
Component: engine
2015-07-14 11:34:33 +02:00
05b319b1cb Zsh completion update for the following commits:
- Add fluentd logging driver to zsh completion #12876
- Add inspect --type flag to zsh completion #13187
- Respect -H option in zsh completion #13195
- Fix number of argument limit for pause and unpause in zsh completion

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 12f67141f932db15fa9178b3304c7efbd485fd69
Component: engine
2015-07-14 11:32:26 +02:00
3c6e2ebd6f zsh: remove Vincent Bernat from reviewers for ZSH completion
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 5dbb217bcb8eb33c4c152f7ba1b5f7fec0b579dd
Component: engine
2015-07-13 23:15:16 +02:00
1e751a74cb Removed short parameters and use Bash features to make code shorter. Thanks to @tianon.
Signed-off-by: Robin Schneider <ypid@riseup.net>
Upstream-commit: 3f0fa1f6436d2bf38388d8cc331cf0ed31da8837
Component: engine
2015-07-13 22:56:15 +02:00
8a8cd3160c Adds documentation for additional groups.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: d77d0268eb1f419509ceb6670ff7aaa298314218
Component: engine
2015-07-13 14:47:28 -04:00
8014aa30a4 Merge pull request #14426 from albers/completion-events
Add some missing events to bash completion
Upstream-commit: 0badebe7348af1b56bce002bb8d1fca03dbdb872
Component: engine
2015-07-13 10:05:36 -07:00
13a7ed0799 Updated docker-engine.spec to build on Oracle Linux 6.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: 865d3a148875485a3749be83b67ea7449830e6b6
Component: engine
2015-07-11 09:53:00 +10:00
68020cd75e Change generate.sh so that the yum command for packages remains generic across distros.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: f18c4f23cc98ba4fd4fb3241571ce31062eda717
Component: engine
2015-07-10 07:34:47 +10:00
414a101271 Add support for building docker-engine RPM on Oracle Linux 7.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: 0117330ae7da7dc77d27c551fb298d842afc3890
Component: engine
2015-07-08 16:12:19 +10:00
9147778cbe Merge pull request #14369 from maximkulkin/14123-dockerize-disk-with-non-en-locale
Fix dockerize-disk.sh working in non-en locale
Upstream-commit: 16f8afb4519ff9dbbb2ed386d0d00d3da54997b9
Component: engine
2015-07-07 17:51:29 -07:00
527b90ee8b Add some missing events to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ea26b3878421fd39e40ec264e604e9efa114592d
Component: engine
2015-07-07 09:04:15 +02:00
863d4d7ae6 fix rpms
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 76a853de6eee072e4874a64e4c5ffcceacdccbf1
Component: engine
2015-07-06 14:14:26 -07:00
44f2447bf7 Fix dockerize-disk.sh working in non-en locale
One part of script relies on messages that are
output by some system tool. In non-en locale
those messages get localized which breaks the
script.
This patch enforces en locale for that system
tool.

Signed-off-by: Maxim Kulkin <maxim.kulkin@gmail.com>
Upstream-commit: 8630ad1530f85c57a96f998e7251ee27c9cf267c
Component: engine
2015-07-02 16:08:12 -07:00
8aaef3e5b3 Flag Addition: --type flag added for docker inspect command
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 2cb74e691538351efbdee7a78be6535f22c5d024
Component: engine
2015-07-01 12:14:01 -04:00
c59f116283 Update the zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b2cc6f1b478f05c21ecd0c52ac6435480e53f472
Component: engine
2015-06-21 17:33:07 +02:00
4152d983c3 Implemented as proposed by @tianon and @ypid. Restores the default behavior (using xz compression).
* `--compression=none` and `--no-compression` to disable compression.
* `--compression=auto` to use the default compression (enabled by default).
* `--compression=xz` to use xz compression (default compression).
* `--compression=gz` to use gzip compression.

Signed-off-by: Robin Schneider <ypid@riseup.net>
Upstream-commit: 52e193bed723c61df73be6f02941d4501866f4a6
Component: engine
2015-06-20 12:14:49 +02:00
40a12bcca9 Add some cgroup related config check
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: fb85a99f5899df7475ba6b1ac4b2e1d32974eca2
Component: engine
2015-06-19 13:47:48 +08:00
3527d4504b Add check config for ext3 file system
Some distros still use ext3 as default file system, we should check
these configs as well.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 0c4c8302898d51d43c83ea3bb6a0ccbf0723457c
Component: engine
2015-06-19 13:45:07 +08:00
6b78ff756b Merge pull request #13935 from asbjornenge/tm_syntax_updates
TM syntax updates
Upstream-commit: 748814a97a0bade1375ffa9cee6009a823b6d75e
Component: engine
2015-06-15 16:12:22 -07:00
8b238203a5 Merge pull request #13942 from calavera/fix_unshare_mount_regression
Fix regression bind mounting shared.
Upstream-commit: 3f11e05db2c2efdac0455b693efdacc6fce1ab62
Component: engine
2015-06-15 11:25:35 -07:00
974ab12463 Revert "contrib/init: unshare mount namespace for inits"
This reverts commit b6569b6b82df4c5e29ee8f5ebd9db7e36919cefd.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d8592eaff8bddb6f29c48cc39dec70db884eda00
Component: engine
2015-06-15 10:35:17 -07:00
77a149d3fd Various cleanups added to asbjornenge/Docker.tmbundle (by the TM maintainer) and support for the LABEL instruction
Docker-DCO-1.1-Signed-off-by: Asbjorn Enge <asbjorn@hanafjedle.net> (github: asbjornenge)
Upstream-commit: dfec4a48c7ac3ea4604b0a6d400109aa2004bad9
Component: engine
2015-06-15 00:04:05 +02:00
c9ef6a3684 Updated TextMate install instruction - this bundle is not included in TM 😄 :rocket
Docker-DCO-1.1-Signed-off-by: Asbjorn Enge <asbjorn@hanafjedle.net> (github: asbjornenge)
Upstream-commit: ac8cbf4952cf745207dbd966109348bbb80c9ebd
Component: engine
2015-06-15 00:02:10 +02:00
8c5d2fbab2 Do not compress rootfs archive in mkimage.sh.
* This wastes CPU time for compressing and decompressing.

Signed-off-by: Robin Schneider <ypid@riseup.net>
Upstream-commit: 0030df868a318bfbdeedfd2158370f79c9d2f93a
Component: engine
2015-06-14 20:51:11 +02:00
57eb64c9c0 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd44018856be421497a35d96f88dd0eec42fae43
Component: engine
2015-06-13 09:27:30 -07:00
84b8fc6fe1 Moving man pages out of docs
Adding in other areas per comments
Updating with comments; equalizing generating man page info
Updating with duglin's comments
Doug is right here again;fixing.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: eacae64bd89ccc95a6db7bda76d36014e71e70ac
Component: engine
2015-06-10 13:43:35 -07:00
ecd78c774c Merge pull request #13546 from hqhq/hq_checkconfig_rescount
Don't check RESOURCE_COUNTERS in new kernel
Upstream-commit: 969cb545ae5022dc38113f741f2ba3f873cfb967
Component: engine
2015-06-08 14:43:17 -07:00
2c15e96c15 Fix docs URL in systemd service file.
Fixes #13799.

Signed-off-by: Eric-Olivier Lamey <eo@lamey.me>
Upstream-commit: dbf5e36fd6257ed237f76a65ccbae4124a4f0bdf
Component: engine
2015-06-08 10:21:43 +00:00
32bfc6a4bf Don't check RESOURCE_COUNTERS in new kernel
Closes: #13543

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8bfc8102be4a9f0d3da936f5b80f2fb4477a558a
Component: engine
2015-06-03 17:26:39 +08:00