Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement method for FlyDB-Cloud #186

Open
sjcsjc123 opened this issue Jul 9, 2023 · 2 comments
Open

implement method for FlyDB-Cloud #186

sjcsjc123 opened this issue Jul 9, 2023 · 2 comments
Labels
difficult:⭐⭐⭐⭐⭐ Up to five stars good first issue Good for newcomers

Comments

@sjcsjc123
Copy link
Member

This FlyDB-Cloud needs to add some operations to simulate Docker or Podman commands. If you are interested in cloud native, this is a good issue! You can visit https://github.com/containers/buildah and https://github.com/sealerio/sealer/blob/main/pkg/imageengine/interface.go

// Image is the interface for image operations.
type Image interface {
	// Login logs in to a container registry.
	Login(opts *LoginOptions) error
	// Logout logs out of a container registry.
	Logout(opts *LogoutOptions) error
	// Push pushes an image to a container registry.
	Push(opts *PushOptions) error
	// Pull pulls an image from a container registry.
	Pull(opts *PullOptions) (string, error)
	// Images lists images.
	Images(opts *ImagesOptions) error
	// Run runs an image.
	Run(opts *RunOptions) error
	// Rm removes containers.
	Rm(opts *RmOptions) error
	// Rmi removes images.
	Rmi(opts *RmiOptions) error
	// Tag tags an image.
	Tag(opts *TagOptions) error
	// Inspect inspects an image.
	Inspect(opts *InspectOptions) (*Spec, error)
	// Build builds an image.
	Build(opts *BuildOptions) (string, error)
}
@sjcsjc123 sjcsjc123 added difficult:⭐⭐⭐⭐⭐ Up to five stars good first issue Good for newcomers labels Jul 9, 2023
@chdlvy
Copy link
Contributor

chdlvy commented Aug 6, 2023

https://pkg.go.dev/github.com/docker/docker/client, the official document here has an api that can directly operate docker. Do we still need to redefine and implement the interface?

@sjcsjc123
Copy link
Member Author

This is for docker. We have another plan for podman. Maybe we can encapsulate the two types of sdks into one method and add an External variable to determine whether it is a docker or a podman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficult:⭐⭐⭐⭐⭐ Up to five stars good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants