use engine-api to replace dockerclient

Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
Sun Hongliang 2016-05-01 00:14:00 +08:00
parent 04b70bff15
commit eafd9d658d
1 changed files with 2 additions and 2 deletions

View File

@ -596,9 +596,9 @@ func (c *Cluster) LaunchTask(t *task.Task) bool {
// In mesos 0.23+ the docker inspect will be sent back in the taskStatus.Data // In mesos 0.23+ the docker inspect will be sent back in the taskStatus.Data
// We can use this to find the right container. // We can use this to find the right container.
inspect := []dockerclient.ContainerInfo{} inspect := []types.ContainerJSONBase{}
if data != nil && json.Unmarshal(data, &inspect) == nil && len(inspect) == 1 { if data != nil && json.Unmarshal(data, &inspect) == nil && len(inspect) == 1 {
container := &cluster.Container{Container: types.Container{ID: inspect[0].Id}, Engine: s.engine} container := &cluster.Container{Container: types.Container{ID: inspect[0].ID}, Engine: s.engine}
if container, err := container.Refresh(); err == nil { if container, err := container.Refresh(); err == nil {
if !t.Stopped() { if !t.Stopped() {
t.SetContainer(container) t.SetContainer(container)