Edits and fixes to Dockerfile Best Practices based on review feedback.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Edits and fixes to Dockerfile Best Practices based on review feedback.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Add note to docs about lack of shell processing in JSON form

Closes #5509

Signed-off-by: Doug Davis <dug@us.ibm.com>
Fixed a typo in "Installing Docker on Mac OS X"

evironment -> environment
Support for consistent MAC address.

Right now, MAC addresses are randomly generated by the kernel when
creating the veth interfaces.

This causes different issues related to ARP, such as #4581, #5737 and #8269.

This change adds support for consistent MAC addresses, guaranteeing that
an IP address will always end up with the same MAC address, no matter
what.

Since IP addresses are already guaranteed to be unique by the
IPAllocator, MAC addresses will inherit this property as well for free.

Consistent mac addresses is also a requirement for stable networking (#8297)
since re-using the same IP address on a different MAC address triggers the ARP
issue.

Finally, this change makes the MAC address accessible through docker
inspect, which fixes #4033.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Merge pull request #8371 from aluzzardi/f-consistent-mac

Support for consistent MAC address.
Network Allocation: Proper rollback in case of failure allocation.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Container: Make allocateNetwork and releaseNetwork public.

Since we are moving network allocation outside of container scope (it
will be managed by create/destroy), those functions need to be
accessible from the outside.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Container: Add restore network functionality.

RestoreNetwork() allows the container to restore its NetworkSettings (IP
and public ports).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Stable Networking: Keep the same network settings across container restarts.

This change will allocate network settings (IP and public ports) at
container creation rather than start and keep them throughout the
lifetime of the container (i.e. until it gets destroyed) instead of
discarding them when the container is stopped.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Daemon: Restore network settings at startup.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Stable MAC addresses: Add support for MAC address restoring.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Fixes bad validMountMode check

Needed to check if the mode was invalid and return error, not valid and
return error.

This didn't get picked up because the existing integration-cli tests
were all either expecting errors when a valid mode was passed in (e.g.
"ro" passed in, we expected an error because it was testing write).  So
modified a test which was testing for "rw" to actually pass in "rw"
instead of assuming the "rw"

Docker-DCO-1.1-Signed-off-by: Brian Goff <bgoff@cpuguy83-mbp.home> (github: cpuguy83)
Merge pull request #8297 from aluzzardi/f-stable-ip

Stable Networking: Keep the same network settings during the entire container lifecycle.
Add test for invalid mount mode for volumes in.
Closes #8389.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Merge pull request #8392 from jfrazelle/pr_8389

Invalid mount mode for volumes in
Merge pull request #8222 from fredlf/adding_official-repo-guidelines

Edits and fixes based on review.
Merge pull request #8360 from duglin/Issue5509

Add note to docs about lack of shell processing in JSON form - Issue 5509
Merge pull request #8388 from merty/patch-1

Fixed a typo in "Installing Docker on Mac OS X"
Automatically relabel volume mounts if user passes :Z with --volume

When you volume mount into a labeled container, we want to allow the
administrator/user the ability to tell docker to fix the labels on the mount.
Using the same basic syntax as the :ro and :rw options on the --volume command

:Z will set the labels so that only the processes within the container can
read/write content.  Since the labels change on creation, this can not be done
by the administrator prior to running the container

:z will change the labels so all containers could read/write content.

drwxr-xr-x. root root system_u:object_r:svirt_sandbox_file_t:s0 /var/run/dan

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