crc-org / crc-extension

Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
Apache License 2.0
17 stars 19 forks source link

OCI image of the extension has too many layers #138

Closed benoitf closed 1 year ago

benoitf commented 1 year ago

It looks overkill that the scratch image has 5 layers for only few files. I would expect only one layer

 podman inspect quay.io/redhat-developer/openshift-local-extension:v1.0.3 | jq -r  ".[0].RootFS.Layers"                                                                                 
[
  "sha256:3e50705de13f561291ad61338da13b067f4664598fdd4aa21f263f1952fc007d",
  "sha256:9a60b33249a6ec5166724740e90319ff0d142810f1bb1838b8165e3da39435fe",
  "sha256:a5a73b0fdc1391487e4d3bbcd84b35c03beacc523c3c010c5e1d6683054d5d4d",
  "sha256:ce38d61a0cbeab8fa713a0e51f037e6e3ce9811218e42599fb829db572df0719",
  "sha256:2df8f75c45966941f93b099825830f036c01c0354ad9d63149e57dedd936459d"
]
gbraad commented 1 year ago

It creates a layer per copy action. I do not see one-layer being a requirement.

https://github.com/crc-org/crc-extension/blob/dbcd3e8a5efb9d41d55d2da7b6c7ebf3a07cf0fe/Dockerfile#L18-L38

gbraad commented 1 year ago

Not a bug/non-issue.

benoitf commented 1 year ago

It's slowing down the download/ installation of an extension You can do a single copy like devsandbox extension that only has only one layer

benoitf commented 1 year ago

like you create the extension folder and you only copy this folder in the last stage

gbraad commented 1 year ago

We can do, but not a hard requirement. we are talking about a small file.

gbraad commented 1 year ago

@praveenkumar needs to coincide with buildscript changes. will be done, but not a high priority now.


Addressed the issue by moving prepare steps into the builder part of the containerfile.