Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
Remove whiteouts after extracting each layer
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
jwilder committed Oct 15, 2015
1 parent 85c6f0f commit 43f89c1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type ContainerConfig struct {
Image string
Volumes map[string]struct{}
VolumesFrom string
Labels map[string]string
Labels map[string]string
}

type Config struct {
Expand Down Expand Up @@ -94,7 +94,7 @@ type Config struct {
WorkingDir string
Entrypoint []string
NetworkDisabled bool
Labels map[string]string
Labels map[string]string
}

type LayerConfig struct {
Expand Down Expand Up @@ -502,11 +502,12 @@ func (e *Export) SquashLayers(to, from *ExportedImage) error {
println(string(out))
return err
}
}
debug(" - Deleting whiteouts")
err = e.deleteWhiteouts(layerDir)
if err != nil {
return err

debug(" - Deleting whiteouts for layer " + entry.LayerConfig.Id[:12])
err = e.deleteWhiteouts(layerDir)
if err != nil {
return err
}
}

debug(" - Rewriting child history")
Expand Down

0 comments on commit 43f89c1

Please sign in to comment.