Browse Source

Merge pull request #28298 from vdemeester/compose-swarm-tty

Add support for tty in compose to swarm
Brian Goff 8 years ago
parent
commit
0bb6bac793

+ 1 - 0
cli/command/stack/deploy.go

@@ -504,6 +504,7 @@ func convertService(
 				User:            service.User,
 				Mounts:          mounts,
 				StopGracePeriod: service.StopGracePeriod,
+				TTY:             service.Tty,
 			},
 			Resources:     resources,
 			RestartPolicy: restartPolicy,

+ 1 - 1
vendor.conf

@@ -132,7 +132,7 @@ github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff
 github.com/docker/go-metrics 86138d05f285fd9737a99bee2d9be30866b59d72
 
 # composefile
-github.com/aanand/compose-file 480a79677acccb83b52c41161c22eaf4358460cc
+github.com/aanand/compose-file 8cff34df885ef07824138236bc4d27d359888b17
 github.com/mitchellh/mapstructure f3009df150dadf309fdee4a54ed65c124afad715
 github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a
 github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45

+ 2 - 2
vendor/github.com/aanand/compose-file/loader/loader.go

@@ -68,8 +68,8 @@ func Load(configDetails types.ConfigDetails) (*types.Config, error) {
 
 	cfg := types.Config{}
 	version := configDict["version"].(string)
-	if version != "3" {
-		return nil, fmt.Errorf("Unsupported version: %#v. The only supported version is 3", version)
+	if version != "3" && version != "3.0" {
+		return nil, fmt.Errorf(`Unsupported Compose file version: %#v. The only version supported is "3" (or "3.0")`, version)
 	}
 
 	if services, ok := configDict["services"]; ok {

File diff suppressed because it is too large
+ 0 - 0
vendor/github.com/aanand/compose-file/schema/bindata.go


+ 8 - 2
vendor/github.com/aanand/compose-file/types/types.go

@@ -14,7 +14,6 @@ var UnsupportedProperties = []string{
 	"dns_search",
 	"domainname",
 	"external_links",
-	"extra_hosts",
 	"ipc",
 	"links",
 	"mac_address",
@@ -24,7 +23,6 @@ var UnsupportedProperties = []string{
 	"restart",
 	"security_opt",
 	"shm_size",
-	"stdin_open",
 	"stop_signal",
 	"tmpfs",
 }
@@ -84,6 +82,7 @@ type ServiceConfig struct {
 	ExternalLinks   []string          `mapstructure:"external_links"`
 	ExtraHosts      map[string]string `mapstructure:"extra_hosts" compose:"list_or_dict_colon"`
 	Hostname        string
+	HealthCheck     *HealthCheckConfig
 	Image           string
 	Ipc             string
 	Labels          map[string]string `compose:"list_or_dict_equals"`
@@ -124,6 +123,13 @@ type DeployConfig struct {
 	Placement     Placement
 }
 
+type HealthCheckConfig struct {
+	Command  []string `compose:"shell_command"`
+	Timeout  string
+	Interval string
+	Retries  *uint64
+}
+
 type UpdateConfig struct {
 	Parallelism     uint64
 	Delay           time.Duration

Some files were not shown because too many files changed in this diff