added functionality to specify container to run
This commit is contained in:
@@ -81,7 +81,8 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
fmt.Sscanf(Ports, "%d", &PortsInt)
|
||||
}
|
||||
|
||||
imageRes, err := client.StartContainer(CreateVM,PortsInt,GPU)
|
||||
// Calls function to do Api call to start the container on the server side
|
||||
imageRes, err := client.StartContainer(CreateVM,PortsInt,GPU,ContainerName)
|
||||
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
|
||||
@@ -9,6 +9,7 @@ var (
|
||||
AddServer string
|
||||
ViewImages string
|
||||
CreateVM string
|
||||
ContainerName string
|
||||
Ports string
|
||||
Mode string
|
||||
RemoveVM string
|
||||
@@ -59,6 +60,12 @@ var AppConfigFlags = []cli.Flag{
|
||||
EnvVars: []string{"CREATE_VM"},
|
||||
Destination: &CreateVM,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ContainerName",
|
||||
Usage: "Specifying the container run on the server side",
|
||||
EnvVars: []string{"CONTAINER_NAME"},
|
||||
Destination: &ContainerName,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "RemoveVM",
|
||||
Usage: "Stop and Remove Docker container",
|
||||
|
||||
Reference in New Issue
Block a user