Skip to content

Commit 20c0145

Browse files
committed
take Options.IgnorePaths into account when temp-remounting
1 parent 734cefc commit 20c0145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

envbuilder.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@ ENTRYPOINT [%q]`, exePath, exePath, exePath)
433433

434434
// temp move of all ro mounts
435435
tempRemountDest := filepath.Join("/", MagicDir, "mnt")
436-
ignorePrefixes := []string{tempRemountDest, "/proc", "/sys"}
436+
// ignorePrefixes is a superset of ignorePaths that we pass to kaniko's
437+
// IgnoreList.
438+
ignorePrefixes := append([]string{"/proc", "/sys"}, ignorePaths...)
437439
restoreMounts, err := ebutil.TempRemount(options.Logger, tempRemountDest, ignorePrefixes...)
438440
defer func() { // restoreMounts should never be nil
439441
if err := restoreMounts(); err != nil {

0 commit comments

Comments
 (0)