moby/daemon/images/image_changes.go
Laura Brehm 4c459ddabd
c8d: add support for docker diff
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-03-30 10:29:07 +01:00

19 lines
449 B
Go

package images
import (
"context"
"errors"
"github.com/docker/docker/container"
"github.com/docker/docker/pkg/archive"
)
func (i *ImageService) Changes(ctx context.Context, container *container.Container) ([]archive.Change, error) {
container.Lock()
defer container.Unlock()
if container.RWLayer == nil {
return nil, errors.New("RWLayer of container " + container.Name + " is unexpectedly nil")
}
return container.RWLayer.Changes()
}