1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/dockerfile/evaluator_windows.go
msabansal 4982a732f3 Enabling expose support for Windows TP5
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-30 17:25:41 -07:00

26 lines
607 B
Go

// +build windows
package dockerfile
import (
"fmt"
"github.com/Microsoft/hcsshim"
)
// platformSupports is a short-term function to give users a quality error
// message if a Dockerfile uses a command not supported on the platform.
func platformSupports(command string) error {
switch command {
// TODO Windows TP5. Expose can be removed from here once TP4 is
// no longer supported.
case "expose":
if !hcsshim.IsTP4() {
break
}
fallthrough
case "user", "stopsignal", "arg":
return fmt.Errorf("The daemon on this platform does not support the command '%s'", command)
}
return nil
}