Documentation
¶
Index ¶
- Constants
- func Exec(name string, args []string, enableTTY bool) error
- func ExecContainer(args cli.Args) error
- func GetContainerInfoByName(name string) (*models.Info, error)
- func GetContainerMountPoint(containerId string) string
- func InitContainerProcess() error
- func NewInitProcess(enableTTY bool, memoryLimit, cpuLimit, volume string, info *models.Info, ...) (*exec.Cmd, *os.File, error)
- func PrintContainerLogs(containerID string, follow bool) error
- func Remove(containerName string, force bool) error
- func Run(args cli.Args, name string, enableTTY bool, detach bool, ...) error
- func SendInitCommand(cmd []string, write *os.File) error
- func Stop(containerName string) error
Constants ¶
View Source
const (
BusyboxRoot = "/var/local/busybox"
)
Paths used across container lifecycle for overlayfs and volume handling.
View Source
const (
DefaultContainerLogFileName = "container.log"
)
View Source
const ExecTargetPidEnv = "TINYDOCKER_EXEC_PID"
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec runs a command inside a running container identified by name. It re-execs the current binary with the hidden command "exec-container", passing the target container's init PID via env for the child to join namespaces.
func ExecContainer ¶
ExecContainer is the internal entrypoint to join target namespaces and run the user command. It expects env TINYDOCKER_EXEC_PID to be set and args to contain the command to run.
func GetContainerMountPoint ¶
GetContainerMountPoint 根据容器ID获取挂载点路径
func InitContainerProcess ¶
func InitContainerProcess() error
func NewInitProcess ¶
func PrintContainerLogs ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.