@@ -24,7 +24,7 @@ type KoolCloudDeployFlags struct {
2424 Timeout uint // env: KOOL_API_TIMEOUT
2525 WwwRedirect bool // env: KOOL_DEPLOY_WWW_REDIRECT
2626 DeployDomainExtras []string // env: KOOL_DEPLOY_DOMAIN_EXTRAS
27-
27+ Platform string // platform for docker build, e.g. linux/amd64
2828 // Cluster string // env: KOOL_DEPLOY_CLUSTER
2929}
3030
@@ -53,6 +53,7 @@ func NewDeployCommand(deploy *KoolDeploy) (cmd *cobra.Command) {
5353 cmd .Flags ().StringArrayVarP (& deploy .flags .DeployDomainExtras , "domain-extra" , "" , []string {}, "List of extra domain aliases" )
5454 cmd .Flags ().BoolVarP (& deploy .flags .WwwRedirect , "www-redirect" , "" , false , "Redirect www to non-www domain" )
5555 cmd .Flags ().UintVarP (& deploy .flags .Timeout , "timeout" , "" , 0 , "Timeout in minutes for waiting the deployment to finish" )
56+ cmd .Flags ().StringVarP (& deploy .flags .Platform , "platform" , "" , "linux/amd64" , "Platform for docker build (default: linux/amd64)" )
5657
5758 return
5859}
@@ -123,7 +124,7 @@ func (d *KoolDeploy) Execute(args []string) (err error) {
123124 if svc .Build != nil {
124125 d .Shell ().Info (" > Build deploy image for service '" , svcName , "'" )
125126
126- if err = cloud .BuildPushImageForDeploy (svcName , svc , deployCreated ); err != nil {
127+ if err = cloud .BuildPushImageForDeploy (svcName , svc , deployCreated , d . flags . Platform ); err != nil {
127128 if reportErr := deployer .BuildError (deployCreated , err ); reportErr != nil {
128129 d .Shell ().Error (fmt .Errorf ("error reporting build error: %v" , reportErr ))
129130 }
0 commit comments