Documentation
¶
Index ¶
- func AddImageSpec(s *specs.Spec, bp *prefab.Blueprint, rootfs string) (err error)
- func DefaultRuntimeSpec() (s *specs.Spec)
- func RootPath(root, path string) (string, error)
- func WithAdditionalGIDs(s *specs.Spec, userstr string, root string) error
- func WithUser(s *specs.Spec, userstr string, root string) (err error)
- type Group
- type Image
- type ImageManager
- func (im *ImageManager) Assemble(imageID string, blueprintPath string, dctx *dcontext.DeployContext, ...) (err error)
- func (im *ImageManager) Delete(imageID string) (err error)
- func (im *ImageManager) Exist(imageID string) (exists bool)
- func (im *ImageManager) Get(imageID string) (image *Image, err error)
- func (im *ImageManager) List() (images []string)
- func (im *ImageManager) Load(imageID string, imagePath string, dctx *dcontext.DeployContext, overwrite bool) (err error)
- func (im *ImageManager) Pack(blueprintPath string, dstDir string, imageID string) (err error)
- func (im *ImageManager) Save(imageID string, dstDir string) (err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddImageSpec ¶
func DefaultRuntimeSpec ¶
These default spec settings are copied from https://github.com/containerd/containerd/tree/main/pkg/oci
func RootPath ¶
RootPath joins a path with a root, evaluating and bounding any symlink to the root directory.
func WithAdditionalGIDs ¶
WithAdditionalGIDs sets the OCI spec's additionalGids array to any additional groups listed for a particular user in the /etc/group file of the image's root filesystem The passed in user can be either a uid or a username.
Types ¶
type ImageManager ¶
type ImageManager struct {
// contains filtered or unexported fields
}
func NewImageManager ¶
func NewImageManager(workDir string, tempDir string, endpoint string) (im *ImageManager, err error)
func (*ImageManager) Assemble ¶
func (im *ImageManager) Assemble(imageID string, blueprintPath string, dctx *dcontext.DeployContext, overwrite bool) (err error)
assemble the blueprint into a given image blueprintPath must be an absoulute path
func (*ImageManager) Delete ¶
func (im *ImageManager) Delete(imageID string) (err error)
func (*ImageManager) Exist ¶
func (im *ImageManager) Exist(imageID string) (exists bool)
func (*ImageManager) List ¶
func (im *ImageManager) List() (images []string)
func (*ImageManager) Load ¶
func (im *ImageManager) Load(imageID string, imagePath string, dctx *dcontext.DeployContext, overwrite bool) (err error)
Click to show internal directories.
Click to hide internal directories.