api: RootFS -> SnapshotKey

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Akihiro Suda
2017-09-04 07:02:43 +00:00
committed by Stephen J Day
parent 8b63386924
commit e30e0c8b75
17 changed files with 168 additions and 171 deletions

View File

@@ -173,13 +173,13 @@ func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...Ne
Stdout: cfg.Stdout,
Stderr: cfg.Stderr,
}
if c.c.RootFS != "" {
if c.c.SnapshotKey != "" {
if c.c.Snapshotter == "" {
return nil, errors.Wrapf(errdefs.ErrInvalidArgument, "unable to resolve rootfs mounts without snapshotter on container")
}
// get the rootfs from the snapshotter and add it to the request
mounts, err := c.client.SnapshotService(c.c.Snapshotter).Mounts(ctx, c.c.RootFS)
mounts, err := c.client.SnapshotService(c.c.Snapshotter).Mounts(ctx, c.c.SnapshotKey)
if err != nil {
return nil, err
}