graph: add VirtualSize for inspect output

Currently inspect output just shows Size info, and that usally be
very small and even 0 which is confusing.

Fixes #8016

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Fix #6509: Interactive container hangs when redirecting stdout

Cli IsTerminal() SYS_IOCTL operation should be determined from STDIN,
not from STDOUT.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
DockerCli: Check IsTerminal() for both STDIN and STDOUT

`docker events > /tmp/out` should not print control
characters to non-terminal STDOUT.

This addresses commit 26b4a4920adca614f6be17a96f254f331271faf0
without creating regression described in issue #6509.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Add DockerCli tests

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Update google.md to point to latest container-vm version

In order to match the version listed here:
https://cloud.google.com/compute/docs/containers/container_vms#starting_a_bare_container-vm_instance
The list of events that 'grep' told me about

docker(master) $ git grep 'LogEvent("' | sed 's/.*("//' | sed 's/").*//'
| sort | uniq | paste -s -d","
create,destroy,die,export,kill,pause,restart,start,stop,unpause

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Add the 2 image events found using git grep 'Job("log"'

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
add wildcard support to copy/add

Signed-off-by: Doug Davis <dug@us.ibm.com>
docker-exec man page is not created.

docker-exec.md needs to be renamed in order to build man page.
Should be docker-exec.1.md

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Documenting Container Tty resize api

Addresses #7840

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Merge pull request #8233 from tiborvass/pr-7658

Fix Interactive container hangs when redirecting stdout
Fix #8259 - Can't reuse symlink'd bindmount

volumes.Get was not checking for symlinked paths meanwhile when adding a
new volume it was following the symlink.
So when trying to use a bind-mount that is a symlink, the volume is
added with the correct path, but when another container tries to use the
same volume it got a "Volume exists" error because volumes.Get returned
nil and as such attempted to create a new volume.

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Vendor libtrust

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Add libtrust key identity management

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Merge pull request #8260 from cpuguy83/8259_fix_bindmount_symlink_reuse

Fix #8259 - Can't reuse symlink'd bindmount
Fix error paring null JSON - Issue7941

Closes #7941

Treat a null in JSON, when reading the config of a container, as if the
property was never included.  W/o this fix the null would be saved in the
property as a string with a value of "null".

Signed-off-by: Doug Davis <dug@us.ibm.com>
Move the body of go_compile_test_dir into a file since GNU Parallel breaks on sourcing exported Bash functions thanks to the shellshock fixes

Signed-off-by: Andrew Page <admwiggin@gmail.com>
check tag's validity before building.

When user passes an invalid tag to `docker build`
(i.e.  `docker build -t abcd:A0123456789B0123456789C0123456789 .`), check the
tag first and terminate-early so user can specify the tag again

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Remove nameserver 127.0.0.1 line rather then dumping resolv.conf

We have a bug report complaining about docker dumping the contents of the
hosts resolv.conf if it container 127.0.0.1.  They asked that instead
of dropping the file altogether, that we just remove the line.

This patch removes the 127.0.0.1 lines, if they exist and then
checks if any nameserver lines exist.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Replace utils.CheckLocalDns with bytes.Contains line

Since RemoveLocalDns patch will  remove all localhost entries
from resolv.conf we no longer need anything more then
!bytes.Contains(resolvConf, []byte("nameserver")

To check for no nameserver entry in dns config.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)