diff --git a/CHANGELOG.md b/CHANGELOG.md index bbedc491e9..e9db48fa99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2284,7 +2284,7 @@ by another client (#15489) - Use mock for search tests. - Update to double-dash everywhere. - Move .dockerenv parsing to lxc driver. -- Move all bind-mounts in the container inside the namespace. +- Move all bind mounts in the container inside the namespace. - Don't use separate bind mount for container. - Always symlink /dev/ptmx for libcontainer. - Don't kill by pid for other drivers. @@ -2719,7 +2719,7 @@ With the ongoing changes to the networking and execution subsystems of docker te + Implement `docker log -f` to stream logs + Add env variable to disable kernel version warning + Add -format to `docker inspect` -+ Support bind-mount for files ++ Support bind mount for files - Fix bridge creation on RHEL - Fix image size calculation - Make sure iptables are called even if the bridge already exists diff --git a/Dockerfile.windows b/Dockerfile.windows index 8f8ee609c4..0c62c94141 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -132,8 +132,8 @@ # Important notes: # --------------- # -# Don't attempt to use a bind-mount to pass a local directory as the bundles target -# directory. It does not work (golang attempts for follow a mapped folder incorrectly). +# Don't attempt to use a bind mount to pass a local directory as the bundles target +# directory. It does not work (golang attempts for follow a mapped folder incorrectly). # Instead, use docker cp as per the example. # # go.zip is not removed from the image as it is used by the Windows CI servers diff --git a/api/swagger.yaml b/api/swagger.yaml index 4e7b4504e8..0c9ee9515a 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -577,7 +577,7 @@ definitions: A list of volume bindings for this container. Each volume binding is a string in one of these forms: - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. items: diff --git a/api/types/mount/mount.go b/api/types/mount/mount.go index 71368643dd..b7d133cd84 100644 --- a/api/types/mount/mount.go +++ b/api/types/mount/mount.go @@ -67,7 +67,7 @@ var Propagations = []Propagation{ type Consistency string const ( - // ConsistencyFull guarantees bind-mount-like consistency + // ConsistencyFull guarantees bind mount-like consistency ConsistencyFull Consistency = "consistent" // ConsistencyCached mounts can cache read data and FS structure ConsistencyCached Consistency = "cached" diff --git a/docs/api/v1.18.md b/docs/api/v1.18.md index 3c82371b4f..973dca9f92 100644 --- a/docs/api/v1.18.md +++ b/docs/api/v1.18.md @@ -232,11 +232,11 @@ Create a container - **ExposedPorts** - An object mapping ports to an empty object in the form of: `"ExposedPorts": { "/: {}" }` - **HostConfig** - - **Binds** – A list of bind-mounts for this container. Each item is a string in one of these forms: + - **Binds** – A list of bind mounts for this container. Each item is a string in one of these forms: + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - **Links** - A list of links for the container. Each link entry should be diff --git a/docs/api/v1.19.md b/docs/api/v1.19.md index bd5f09f670..3bcf7668f9 100644 --- a/docs/api/v1.19.md +++ b/docs/api/v1.19.md @@ -239,11 +239,11 @@ Create a container - **ExposedPorts** - An object mapping ports to an empty object in the form of: `"ExposedPorts": { "/: {}" }` - **HostConfig** - - **Binds** – A list of bind-mounts for this container. Each item is a string in one of these forms: + - **Binds** – A list of bind mounts for this container. Each item is a string in one of these forms: + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - **Links** - A list of links for the container. Each link entry should be diff --git a/docs/api/v1.20.md b/docs/api/v1.20.md index a7fc999aee..e5b8f32fce 100644 --- a/docs/api/v1.20.md +++ b/docs/api/v1.20.md @@ -239,11 +239,11 @@ Create a container - **ExposedPorts** - An object mapping ports to an empty object in the form of: `"ExposedPorts": { "/: {}" }` - **HostConfig** - - **Binds** – A list of bind-mounts for this container. Each item is a string in one of these forms: + - **Binds** – A list of bind mounts for this container. Each item is a string in one of these forms: + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - **Links** - A list of links for the container. Each link entry should be diff --git a/docs/api/v1.21.md b/docs/api/v1.21.md index 1d42fd0ecc..f1863b8c11 100644 --- a/docs/api/v1.21.md +++ b/docs/api/v1.21.md @@ -255,7 +255,7 @@ Create a container + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + `volume-name:container-dest` to bind-mount a volume managed by a diff --git a/docs/api/v1.22.md b/docs/api/v1.22.md index 9bf64b7e94..473ffd3c91 100644 --- a/docs/api/v1.22.md +++ b/docs/api/v1.22.md @@ -357,7 +357,7 @@ Create a container + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + `volume-name:container-dest` to bind-mount a volume managed by a diff --git a/docs/api/v1.23.md b/docs/api/v1.23.md index 508a721c75..c040d2460a 100644 --- a/docs/api/v1.23.md +++ b/docs/api/v1.23.md @@ -382,7 +382,7 @@ Create a container + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + `volume-name:container-dest` to bind-mount a volume managed by a diff --git a/docs/api/v1.24.md b/docs/api/v1.24.md index d07ea84b34..29fed46a22 100644 --- a/docs/api/v1.24.md +++ b/docs/api/v1.24.md @@ -414,7 +414,7 @@ Create a container + `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - + `host-src:container-dest:ro` to make the bind-mount read-only + + `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + `volume-name:container-dest` to bind-mount a volume managed by a diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 6032de4d93..d080086f78 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -2185,7 +2185,7 @@ func (s *DockerSuite) TestVolumesNoCopyData(c *check.C) { tmpDir := testutil.RandomTmpDirPath("docker_test_bind_mount_copy_data", testEnv.DaemonPlatform()) if out, _, err := dockerCmdWithError("run", "-v", tmpDir+":/foo", "dataimage", "ls", "-lh", "/foo/bar"); err == nil || !strings.Contains(out, "No such file or directory") { - c.Fatalf("Data was copied on bind-mount but shouldn't be:\n%q", out) + c.Fatalf("Data was copied on bind mount but shouldn't be:\n%q", out) } } diff --git a/oci/defaults.go b/oci/defaults.go index c1d5909713..b67d0178fb 100644 --- a/oci/defaults.go +++ b/oci/defaults.go @@ -156,7 +156,7 @@ func DefaultLinuxSpec() specs.Spec { }, // Devices implicitly contains the following devices: // null, zero, full, random, urandom, tty, console, and ptmx. - // ptmx is a bind-mount or symlink of the container's ptmx. + // ptmx is a bind mount or symlink of the container's ptmx. // See also: https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#default-devices Devices: []specs.LinuxDevice{}, Resources: &specs.LinuxResources{