Documentation
¶
Overview ¶
Package container contains the logic for creating and entering containers.
Index ¶
- Variables
- func Contains(list []string, item string) bool
- func ContainsString(list []string, item string) bool
- func Create(cfg config.Structure, deleteOld bool) error
- func Enter(cfg config.Structure, root bool) error
- func FileExists(path string) bool
- func GetFolderFiles(path string) ([]string, error)
- func GetFolderFilesMtch(path string, match string) ([]string, error)
- func InstallAndEnter(cfg config.Structure, root bool) error
- func MountArg(list []string, mount string, readOnly bool, bindPropagation string) []string
- func ReplaceEnvVars(str string) string
- func RunCommandList(name string, commands []string, pman *podman.Podman, root bool, ...) error
Constants ¶
This section is empty.
Variables ¶
var DontAttachEnter = false
DontAttachEnter is a flag that tells the enter command to not attach to the container (for the enter command)
var DontStopOnFinish = false
DontStopOnFinish prevents the container from stopping after the create commands are ran
var PkgVersion = "latest"
PkgVersion specifies the version of develbox (inside the container)
Functions ¶
func ContainsString ¶ added in v0.6.0
ContainsString loops through a list to check if a string contains an item
func FileExists ¶
FileExists checks if a file/path exists using os.Stat()
func GetFolderFiles ¶
GetFolderFiles reads all the names in the a path, and returns them
func GetFolderFilesMtch ¶ added in v0.1.0
GetFolderFilesMtch returns a list of all the files inside a path that match a string
func InstallAndEnter ¶ added in v0.4.0
InstallAndEnter install the packages and runs a shell in the container
func MountArg ¶ added in v0.5.9
MountArg appends a string to a list with the mount argument. It also checks path existance and replaces any environment variables
func ReplaceEnvVars ¶ added in v0.4.0
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.
Types ¶
This section is empty.