builder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMounts

func CreateMounts(fsExePath string, originalLayers []image.OriginalLayer, shadowLayers []image.ShadowLayer) []mount.Mount

CreateMounts creates mounts for each layer. It does not create anything on the filesystem.

func ExportImg

func ExportImg(imgName string, workDir string, overlayPath string, dockerRootDir string, cli *client.Client, ctx *context.Context, topN int) (bool, string, []image.ShadowLayer)

ExportImg exports the debloated image to a tar file. It returns if exported, target tar path, shadow layers.

func ExtractLayersInfo

func ExtractLayersInfo(imgInfo *types.ImageInspect, overlayPath string, dockerRootDir string) []image.LayerInfo

ExtractLayersInfo extracts layer info from image inspect, from top to bottom. It returns a list of layer info.

func LoadImage

func LoadImage(imgTarPath string, cli *client.Client)

LoadImage loads the generated image tar file.

func ShadowImage

func ShadowImage(imgName string, workDir string, overlayPath string,
	dockerRootDir string, cli *client.Client, ctx *context.Context, optimize string) (bool, []image.OriginalLayer, []image.ShadowLayer)

ShadowImage shadows the image. For each original layer, it creates a shadow layer in memory. It does not create anything on the filesystem. It returns if shadowed, original layers, shadow layers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL