container

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package container contains the logic for creating and entering containers.

Index

Constants

This section is empty.

Variables

View Source
var PkgVersion = "latest"

PkgVersion specifies the version of develbox (inside the container)

Functions

func Create

func Create(cfg config.Structure, deleteOld bool)

Create creates a container and runs the setupContainer function

func Enter

func Enter(cfg config.Structure, root bool) error

Enter runs a shell in the container and creates a pipe for package installations.

func FileExists

func FileExists(path string) bool

FileExists checks if a file/path exists using os.Stat()

func GetFolderFiles

func GetFolderFiles(path string) ([]string, error)

GetFolderFiles reads all the names in the a path, and returns them

func GetFolderFilesMtch added in v0.1.0

func GetFolderFilesMtch(path string, match string) ([]string, error)

GetFolderFilesMtch returns a list of all the files inside a path that match a string

func InstallAndEnter added in v0.4.0

func InstallAndEnter(cfg config.Structure, root bool) error

InstallAndEnter install the packages and runs a shell in the container

func ReplaceEnvVars added in v0.4.0

func ReplaceEnvVars(str string) string

ReplaceEnvVars matches any text that starts with "$" and replaces it with the value of the environment variable. If not set, it will return an empty string.

func RunCommandList

func RunCommandList(name string, commands []string, pman *podman.Podman, root bool, attach podman.Attach) error

RunCommandList loops through the commands list and runs each one separately

Types

This section is empty.

Jump to

Keyboard shortcuts

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