RUN commands dont specify which files were added
This commit is contained in:
parent
febeb075a1
commit
b058214391
|
|
@ -421,7 +421,8 @@ func (s *stageBuilder) build() error {
|
||||||
// Raise Warnings for commands that are uncacheable
|
// Raise Warnings for commands that are uncacheable
|
||||||
switch command.(type) {
|
switch command.(type) {
|
||||||
case *commands.RunCommand:
|
case *commands.RunCommand:
|
||||||
if len(files) == 0 {
|
fi, err := os.Stat(tarPath)
|
||||||
|
if err == nil && fi.Size() <= emptyTarSize {
|
||||||
logrus.Warn("cache-violation: RUN created an empty layer, this will cause a diff when rebuilding from cache for the first time.")
|
logrus.Warn("cache-violation: RUN created an empty layer, this will cause a diff when rebuilding from cache for the first time.")
|
||||||
}
|
}
|
||||||
case *commands.WorkdirCommand:
|
case *commands.WorkdirCommand:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue