added ports and fixed docker ID not returning back

This commit is contained in:
2021-04-08 01:45:42 +04:00
parent ee8bed9c25
commit 2b2290ecea
6 changed files with 35 additions and 15 deletions

View File

@@ -187,6 +187,9 @@ func (d *DockerVM)runContainer(dockerClient *client.Client) error{
res, err := dockerClient.ContainerCreate(ctx,config,hostConfig,
nil,nil,"")
// Set response ID
d.ID = res.ID
if err != nil {
return err
}
@@ -200,6 +203,8 @@ func (d *DockerVM)runContainer(dockerClient *client.Client) error{
return nil
}
// TODO: Implement and remove docker instance running
func print(rd io.Reader) error {
var lastLine string