Movatterモバイル変換


[0]ホーム

URL:


ebutil

package
v1.1.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License:Apache-2.0Imports:10Imported by:0

Details

Repository

github.com/coder/envbuilder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcTempRemount

func TempRemount(logflog.Func, deststring, ignorePrefixes ...string) (restore func()error, errerror,)

TempRemount iterates through all read-only mounted filesystems, bind-mounts them at dest,and unmounts them from their original source. All mount points underneath ignorePrefixeswill not be touched.

Some container runtimes such as sysbox-runc will mount in `/lib/modules` read-only.Seehttps://github.com/nestybox/sysbox/issues/564This trips us up because:

  1. We call a Kaniko library function `util.DeleteFilesystem` that does exactly what it sayson the tin. If this hits a read-only volume mounted in, unhappiness is the result.
  2. After deleting the filesystem and building the image, we extract it to the filesystem.If some paths mounted in via volume are present at that time, unhappiness is also likelyto result -- especially in case of read-only mounts.

To work around this we move the mounts out of the way temporarily by bind-mounting themwhile we do our thing, and move them back when we're done.

It is the responsibility of the caller to call the returned functionto restore the original mount points. If an error is encountered while attempting to performthe operation, calling the returned function will make a best-effort attempt to restorethe original state.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp