Browse code

Don't validate platform-dep tmpfs opts on client

Daemon still does validation and errors out on incorrect options.

Fixes an issue where non-Linux clients attempting to pass tmpfs options
on `docker run` to a Linux daemon will incorrectly error out.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2016/11/16 01:01:40
Showing 1 changed files
... ...
@@ -14,7 +14,6 @@ import (
14 14
 	networktypes "github.com/docker/docker/api/types/network"
15 15
 	"github.com/docker/docker/api/types/strslice"
16 16
 	"github.com/docker/docker/opts"
17
-	"github.com/docker/docker/pkg/mount"
18 17
 	"github.com/docker/docker/pkg/signal"
19 18
 	"github.com/docker/go-connections/nat"
20 19
 	units "github.com/docker/go-units"
... ...
@@ -378,9 +377,6 @@ func Parse(flags *pflag.FlagSet, copts *ContainerOptions) (*container.Config, *c
378 378
 	tmpfs := make(map[string]string)
379 379
 	for _, t := range copts.tmpfs.GetAll() {
380 380
 		if arr := strings.SplitN(t, ":", 2); len(arr) > 1 {
381
-			if _, _, err := mount.ParseTmpfsOptions(arr[1]); err != nil {
382
-				return nil, nil, nil, err
383
-			}
384 381
 			tmpfs[arr[0]] = arr[1]
385 382
 		} else {
386 383
 			tmpfs[arr[0]] = ""