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

@@ -251,7 +251,7 @@ func withRemappedSnapshotBase(id string, i Image, uid, gid uint32, readonly bool
if _, err := snapshotter.Prepare(ctx, id, usernsID); err != nil {
return err
}
c.RootFS = id
c.SnapshotKey = id
c.Image = i.Name()
return nil
}
@@ -274,7 +274,7 @@ func withRemappedSnapshotBase(id string, i Image, uid, gid uint32, readonly bool
if err != nil {
return err
}
c.RootFS = id
c.SnapshotKey = id
c.Image = i.Name()
return nil
}
@@ -319,11 +319,11 @@ func WithUserID(uid uint32) SpecOpts {
if c.Snapshotter == "" {
return errors.Errorf("no snapshotter set for container")
}
if c.RootFS == "" {
return errors.Errorf("rootfs not created for container")
if c.SnapshotKey == "" {
return errors.Errorf("rootfs snapshot not created for container")
}
snapshotter := client.SnapshotService(c.Snapshotter)
mounts, err := snapshotter.Mounts(ctx, c.RootFS)
mounts, err := snapshotter.Mounts(ctx, c.SnapshotKey)
if err != nil {
return err
}
@@ -376,11 +376,11 @@ func WithUsername(username string) SpecOpts {
if c.Snapshotter == "" {
return errors.Errorf("no snapshotter set for container")
}
if c.RootFS == "" {
return errors.Errorf("rootfs not created for container")
if c.SnapshotKey == "" {
return errors.Errorf("rootfs snapshot not created for container")
}
snapshotter := client.SnapshotService(c.Snapshotter)
mounts, err := snapshotter.Mounts(ctx, c.RootFS)
mounts, err := snapshotter.Mounts(ctx, c.SnapshotKey)
if err != nil {
return err
}