Documentation ¶
Index ¶
- func CheckFileDigest(path string, digest string) bool
- func Exist(path string) bool
- func GetFileDigest(path string) string
- func GetPid(id string) (int, error)
- func Mount(src, dest string, mode uintptr) error
- func MountBind(src, dest string) error
- func MountDevPts(dest string) error
- func MountMqueue(dest string) error
- func MountProc(dest string) error
- func MountShm(dest string) error
- func MountTmpfs(dest string) error
- func PivotRoot(path string) error
- func UntarFile(workspaceId, path, target string) error
- type DockerlessProvider
- func (p *DockerlessProvider) Create(ctx context.Context, workspaceId string, runOptions *driver.RunOptions) error
- func (p *DockerlessProvider) Delete(ctx context.Context, workspaceId string) error
- func (p *DockerlessProvider) Enter(ctx context.Context, workspaceId string) error
- func (p *DockerlessProvider) ExecuteCommand(ctx context.Context, workspaceId, user, command string, stdin io.Reader, ...) error
- func (p *DockerlessProvider) Find(ctx context.Context, workspaceId string) (*config.ContainerDetails, error)
- func (p *DockerlessProvider) Pull(ctx context.Context, runOptions *driver.RunOptions) error
- func (p *DockerlessProvider) Start(ctx context.Context, workspaceId string) error
- func (p *DockerlessProvider) Stop(ctx context.Context, workspaceId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileDigest ¶
CheckFileDigest will compare input digest to the checksum of input file. Returns whether the input digest is equal to the input file's one.
func GetFileDigest ¶
GetFileDigest will return the sha256sum of input file. Empty if error occurs.
func MountBind ¶
MountBind will bind-mount src path in dest path. Said mount will be created with mode: rbind,rprivate.
func MountDevPts ¶
MountDevPts will mount a new devpts in dest path. Said mount will be created with mode: noexec,nosuid,newinstance,ptmxmode=0666,mode=0620.
func MountMqueue ¶
MountMqueue will mount a new mqueue tmpfs in dest path. Said mount will be created with mode: noexec,nosuid,nodev.
func MountProc ¶
MountProc will mount a new procfs in dest path. Said mount will be created with mode: noexec,nosuid,nodev.
func MountShm ¶
MountShm will mount a new shm tmpfs to dest path. Said mount will be created with mode: noexec,nosuid,nodev,mode=1777,size=65536k.
func MountTmpfs ¶
MountTmpfs will mount a new tmpfs in dest path.
Types ¶
type DockerlessProvider ¶
func NewProvider ¶
func (*DockerlessProvider) Create ¶
func (p *DockerlessProvider) Create(ctx context.Context, workspaceId string, runOptions *driver.RunOptions) error
CreateRootfs will generate a chrootable rootfs from input oci image reference, with input name and config. If input image is not found it will be automatically pulled. This function will read the oci-image manifest and properly unpack the layers in the right order to generate a valid rootfs. Untarring process will follow the keep-id option if specified in order to ensure no permission problems. Generated config will be saved inside the container's dir. This will NOT be an oci-compatible container config.
func (*DockerlessProvider) Delete ¶
func (p *DockerlessProvider) Delete(ctx context.Context, workspaceId string) error
func (*DockerlessProvider) Enter ¶
func (p *DockerlessProvider) Enter(ctx context.Context, workspaceId string) error
func (*DockerlessProvider) ExecuteCommand ¶
func (*DockerlessProvider) Find ¶
func (p *DockerlessProvider) Find(ctx context.Context, workspaceId string) (*config.ContainerDetails, error)
func (*DockerlessProvider) Pull ¶
func (p *DockerlessProvider) Pull(ctx context.Context, runOptions *driver.RunOptions) error
Pull will pull a given image and save it to ImageDir. This function uses github.com/google/go-containerregistry/pkg/crane to pull the image's manifest, and performs the downloading of each layer separately. Each layer is deduplicated between images in order to save space, using hardlinks.