From 4e8ec3d1512f286f22f26acf9f5cbd866ce3f1e2 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 16 Sep 2015 14:21:34 -0400 Subject: [PATCH] deprecate bind path auto-create Signed-off-by: Brian Goff Upstream-commit: 249f45bcfe1adf4b3550306951f2768b17802217 Component: engine --- components/engine/daemon/volumes.go | 1 + components/engine/docs/misc/deprecated.md | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/components/engine/daemon/volumes.go b/components/engine/daemon/volumes.go index 29ce462624..f2adebe8f3 100644 --- a/components/engine/daemon/volumes.go +++ b/components/engine/daemon/volumes.go @@ -53,6 +53,7 @@ func (m *mountPoint) Setup() (string, error) { if !os.IsNotExist(err) { return "", err } + logrus.Warnf("Auto-creating non-existant volume host path %s, this is deprecated and will be removed soon", m.Source) if err := system.MkdirAll(m.Source, 0755); err != nil { return "", err } diff --git a/components/engine/docs/misc/deprecated.md b/components/engine/docs/misc/deprecated.md index 018787bf0a..4b63716a1e 100644 --- a/components/engine/docs/misc/deprecated.md +++ b/components/engine/docs/misc/deprecated.md @@ -89,3 +89,14 @@ The following double-dash options are deprecated and have no replacement: docker ps --since-id docker ps --before-id docker search --trusted + +### Auto-creating missing host paths for bind mounts +**Deprected in Release: v1.9** + +**Target for Removal in Release: 1.11** + +When creating a container with a bind-mounted volume-- `docker run -v /host/path:/container/path` -- +docker was automatically creating the `/host/path` if it didn't already exist. + +This auto-creation of the host path is deprecated and docker will error out if +the path does not exist.