Commit Graph

71 Commits

Author SHA1 Message Date
Alexander Morozov e30532cf3f Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:06:50 +00:00
Alexander Morozov 1459501312 Default 'json-file' logging driver and none logging driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:06:50 +00:00
Andy Goldstein 2eaa831df5 Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2017-06-02 00:06:50 +00:00
Sebastiaan van Stijn 3359add082 docs: use more tables in run reference and minor fixups
This adds two more tables to the run reference documentation.

- the list of 'modes' for Network settings is now a table.
- the "note" for `--net="host"` was moved from the list to the detailed
  description.
- the 'options' for "Runtime constraints on CPU and memory" are
  now a table
- slightly re-worded the description for "memory" options, e.g.
  "It is not allowed..." was rewriten to "The *container* is not allowed..."
- fix example in "Runtime privilege, Linux capabilities, and LXC configuration"
  being indented twice
- slightly reduced indenting in some `usage` output to be better readable.
- fixes a typo `/ets/hosts` -> `/etc/hosts`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:06:50 +00:00
Michal Minar 6098d0f443 Use system's ephemeral port range for port allocation
Read `/proc/sys/net/ipv4/ip_local_port_range` kernel parameter to obtain
ephemeral port range that now sets the boundaries of port allocator
which finds free host ports for those exported by containers.

Signed-off-by: Michal Minar <miminar@redhat.com>
2017-06-02 00:06:49 +00:00
ChristoperBiscardi 50caf393cb Fix a few code rendering errors in docs
Signed-off-by: ChristoperBiscardi <chris@docker.com>
2017-06-02 00:06:49 +00:00
Sven Dowideit 5f274ccd57 fix to cpu.shares documentation by @hqhq
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:48 +00:00
Qiang Huang ef5874f0a9 docs: fix cpu.shares part in man pages
The original description has some mistakes and lack of many useful
information, I rewrite them to make it accurate and complete.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:48 +00:00
Sebastiaan van Stijn 99a47ff600 Docs: add restart-policies to 'Run reference'
This moves some information on restart-policies from
the "command line" page to "run reference".

Also fixes some minor typos and adds a "NOTE"
about --rm and --restart not allowed to be combined.

Also removes inline CSS styles from tables,
which will be styled by the stylesheet, and fixes
some minor MarkDown errors (`<` -> &lt;)

depends on https://github.com/docker/docs-base/pull/1

resolves #11069

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:06:48 +00:00
Qiang Huang c03b0700a4 update docs for memory and memoryswap
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:06:46 +00:00
Doug Davis 130c0bf094 Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:46 +00:00
Lei Jitang ca57d01f87 Update the docs for --link accept container id
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:06:45 +00:00
Sebastiaan van Stijn 7c63b49df6 Document that ENV vars are not automatically updated
Unlike the entries in `/etc/hosts`, environment-variables for linked
containers are not automatically updated if the linked container is
restarted.

This adds a note to the documentation in;
https://docs.docker.com/userguide/dockerlinks/#environment-variables
and
https://docs.docker.com/reference/run/#env-environment-variables

To make users aware that this is the case and recommends them to use
the `/etc/hosts` entries in stead.

I added this change because users were expecting environment variables
to be updated automatically as well (https://github.com/docker/docker/issues/10164).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:06:45 +00:00
Dan Walsh f4573ee0bc Allow the container to share the PID namespace with the host
We want to be able to use container without the PID namespace.  We basically
want containers that can manage the host os, which I call Super Privileged
Containers.  We eventually would like to get to the point where the only
namespace we use is the MNT namespace to bring the Apps userspace with it.

By eliminating the PID namespace we can get better communication between the
host and the clients and potentially tools like strace and gdb become easier
to use.  We also see tools like libvirtd running within a container telling
systemd to place a VM in a particular cgroup, we need to have communications of the PID.

I don't see us needing to share PID namespaces between containers, since this
is really what docker exec does.

So currently I see us just needing docker run --pid=host

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:44 +00:00
Christian Stefanescu c5bd80c738 Fixed minor typo
Signed-off-by: Christian Stefanescu <st.chris@gmail.com>
2017-06-02 00:06:44 +00:00
Srini Brahmaroutu c33d198609 add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2017-06-02 00:06:44 +00:00
Sven Dowideit 1cc7a4eb81 add Scott's link checker script, and fix what it finds
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:06:43 +00:00
shishir-a412ed 41d3d7dc72 Added description for 'docker run' command, -c/--cpu-shares flag
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2017-06-02 00:06:43 +00:00
Arnaud Porterie 76daef2b9a 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>
2017-06-02 00:06:43 +00:00
Sven Dowideit acd8287c74 Add a fuse example, combining both SYS_ADMIN and --device
inspired by #9448 and #9487

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
2017-06-02 00:06:43 +00:00
Sven Dowideit c5e525eb4c add --cap-add=NET_ADMIN to make a new network device
inspired by #9452

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
2017-06-02 00:06:43 +00:00
Sven Dowideit dc2868ee11 Note that using -lxc-conf to change things Docker manages has pitfalls
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:43 +00:00
Michal Minar fec9e65e60 Corrected description of --sig-proxy
Signal proxy does work only in non-TTY mode (--tty=false). Man pages and
commands should not lie about it.

Signed-off-by: Michal Minar <miminar@redhat.com>
2017-06-02 00:06:40 +00:00
Dan Walsh 4d80935bff 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)
2017-06-02 00:06:40 +00:00
George Xie fb4c349f40 unify `–`(en dash) to `-` when specifying options
Signed-off-by: Xie Shi <georgexsh@gmail.com>
2017-06-02 00:06:39 +00:00
Malte Janduda 7a545897fe enhancing set-macaddress docu #2
Signed-off-by: Malte Janduda <mail@janduda.net>
2017-06-02 00:06:39 +00:00
Malte Janduda a9e9f21f0f enhancing set-macaddress docu
Signed-off-by: Malte Janduda <mail@janduda.net>
2017-06-02 00:06:39 +00:00
Malte Janduda ad1a9d8d2f Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
2017-06-02 00:06:39 +00:00
Srini Brahmaroutu 5b9405b388 adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2017-06-02 00:06:39 +00:00
Sven Dowideit aedfc62293 Link to run reference from cli doc
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:37 +00:00
Sven Dowideit 981a612adf Add info on --device flag permissions ':rwm'
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:37 +00:00
Doug Davis 3be32c5e8e Add some docs about which env vars are defined in new containers
@SvenDowideit FYI

Closes #3087

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:06:36 +00:00
Dan Walsh 53ee6d2237 Fix security-opt docs
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:36 +00:00
Victor Vieux c5f3535b06 update docs
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-06-02 00:06:35 +00:00
Dan Walsh 5619082f2b Add --security-opts options to allow user to customize security configuration
security-opts will allow you to customise the security subsystem.

For example the labeling system like SELinux will run on a container.

    --security-opt="label:user:USER"   : Set the label user for the container
    --security-opt="label:role:ROLE"   : Set the label role for the container
    --security-opt="label:type:TYPE"   : Set the label type for the container
    --security-opt="label:level:LEVEL" : Set the label level for the container
    --security-opt="label:disabled"    : Turn off label confinement for the container

Since we are passing a list of string options instead of a space separated
string of options, I will change function calls to use InitLabels instead of
GenLabels.  Genlabels interface is Depracated.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2017-06-02 00:06:35 +00:00
Dan Cotora d6d5dcd55a Doc update to clarify random port mapping on docker run -P
Signed-off-by: Dan Cotora <d@bluevision.ro>
2017-06-02 00:06:35 +00:00
Tim Hockin 14c0f0781d Allow extra lines in /etc/hosts
This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
2017-06-02 00:06:34 +00:00
Sven Dowideit 3ca630d381 Consistently use 'sudo docker' in examples
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:34 +00:00
Sven Dowideit 70abfec849 add -p PORT as a valid format specification
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2017-06-02 00:06:33 +00:00
James Turnbull 5547dedac3 Added --device flag to run reference
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2017-06-02 00:06:33 +00:00
Victor Vieux bbea6aa42d Update /etc/hosts when linked container is restarted
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:33 +00:00
Victor Vieux 4fc06d1790 update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:32 +00:00
Fred Lifton dbec9b15d4 Added info re: image[:tag] to make docs consistent. Fixed a markdown issue.
Closes issue #6833

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
2017-06-02 00:06:31 +00:00
Henning Sprang ff64867b75 Adjust Link description to match target
The target document headline is "Managing data in containers" and so should the link be named.
2017-06-02 00:06:31 +00:00
Victor Vieux 4a685c6482 update api doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:31 +00:00
Victor Vieux 1b9bc637e6 add doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2017-06-02 00:06:31 +00:00
Bryan Bess 316fa6a218 Fix typos
Docker-DCO-1.1-Signed-off-by: Bryan Bess <squarejaw@bsbess.com> (github: squarejaw)
2017-06-02 00:06:31 +00:00
Felix Rabe c23159c986 run.md: Fix references to cli
There are now no other occurrences of `#cli-` in this document.

TODO: Find other places with wrong links.
2017-06-02 00:06:30 +00:00
SvenDowideit 6f03f597ad I'm going to wish I didn't do this
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2017-06-02 00:06:30 +00:00
James Turnbull dce7a15eda Formatting and consistency fixes to CLI and RUN references
* Removed double backticks.
* Reformatted paragraphs.
* Fixed consistent STDOUT/STDIN/STDERR references.
* Fixed several broken URLs.
* Fixed backtick mismatches.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
2017-06-02 00:06:30 +00:00