pods

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pods gives paid members a personal Linux container over SSH (`ssh pod@host`) — "run shit in a docker-like" without root on the host.

Engine preference: rootless Podman (daemonless; container root maps to an unprivileged host uid via user namespaces), falling back to Docker with a hardened profile (cap-drop ALL, no-new-privileges, non-root user, cpu/mem/ pids caps). Either way the SSH user never touches the host OS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager provisions and attaches per-user pods.

func Detect

func Detect() (*Manager, error)

Detect picks the best available engine. Returns an error if neither podman nor docker is present.

func (*Manager) Attach

func (m *Manager) Attach(s ssh.Session, user string) error

Attach provisions the pod and wires the SSH session to a shell inside it. Blocks until the shell exits or the session closes.

func (*Manager) Engine

func (m *Manager) Engine() string

Engine reports the active container engine.

func (*Manager) Exec

func (m *Manager) Exec(s ssh.Session, user string, argv []string) error

Exec provisions the user's pod and runs argv inside it wired to the SSH session (PTY required). Used for tor@/tor-irc@ so arbitrary or interactive commands run sandboxed in the member's container, never on the host. Blocks until the command exits or the session closes.

Jump to

Keyboard shortcuts

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