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

Image and Layer implementation seems a little coupled #1065

Closed
xiekeyang opened this issue Jun 22, 2017 · 2 comments
Closed

Image and Layer implementation seems a little coupled #1065

xiekeyang opened this issue Jun 22, 2017 · 2 comments
Assignees

Comments

@xiekeyang
Copy link

Now Image and Layer seems to exist some coupled problem:

  • RootFS includes Layer structure;
  • images/image.go includes RootFS function;
  • The functionality getting layers is implemented in cmd;
  • containerd/image.go has image interface and its structure
  • ...

Above is being implemented in both service and driver packages.

We might should set up individual interface and structure for image, layer and rootfs.

Maybe, we should setup layer interface(driver) in new file image/layer.go, and interface(service) in containerd/layer.go.

layer member is according to https://github.com/opencontainers/image-spec/blob/master/layer.md#change-types, to be CreateLayer, DeleteLayer, GetLayers...

For structure implementation, Layer might be inside to Image, that can be easy to be called by APIs.

cc @stevvooe @dmcgowan @estesp

@crosbymichael
Copy link
Member

ping @dmcgowan

@dmcgowan
Copy link
Member

I think this is a big premature. Once we have a design proposal or working implementation of an OCI image which doesn't use layers, we can figure out how that can be implemented in containerd. While there are many helpers around layers in containerd, none of our interfaces enforce it. Snapshots don't have to be layers, content doesn't have to be layers, and the runtime only cares about mounts. I am going to close this for now, the layerless image discussion should happen elsewhere.

ianlewis pushed a commit to ianlewis/containerd that referenced this issue Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants