pack build command to export to OCI layout format on disk#1596
Conversation
52af388 to
86618f2
Compare
c1c247a to
1f61446
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1596 +/- ##
==========================================
- Coverage 79.72% 79.25% -0.47%
==========================================
Files 165 147 -18
Lines 10885 9076 -1809
==========================================
- Hits 8677 7192 -1485
+ Misses 1683 1463 -220
+ Partials 525 421 -104
Flags with carried forward coverage won't be shown. Click here to find out more. |
31b8178 to
f0666c1
Compare
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
…, app image destination and previous image) is mounting independently Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
3fa4b03 to
256b0dc
Compare
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
…format Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
| if cfg.Experimental { | ||
| cfg.LayoutRepositoryDir = filepath.Join(filepath.Dir(cfgPath), "layout-repo") | ||
| } else { | ||
| cfg.LayoutRepositoryDir = "" | ||
| } |
There was a problem hiding this comment.
This feels a little odd to me. Are we sure we want the default layout dir in the config dir?
Also, it looks like this isn't actually configurable right? It's either the default or nothing.
There was a problem hiding this comment.
Yeah, for now, because the feature is experimental, I didn't want to do a lot of work giving the user a configuration option. basically, the idea is:
- We need a place to save the
run-imageon disk, maybe the user doesn't care, that's why I am saving them in the pack home directory - I am planning to document this behavior in the docs so users can be aware of it.
The other alternative is, I could work on the user experience for configuring and customizing this kind of thing, but, I was planing to do it after shipping at least something the users can play with
There was a problem hiding this comment.
Actually, I can see pack already save some data in the same folder, for example.
➜ > tree ~/.pack -L 1
/Users/jbustamante/.pack
├── completion.zsh
├── config.toml
├── download-cache
├── layout-repo
├── registry-a932275bd19c2d9e1b88fa06698fd2f5427a363d25bf87fa500691c373089381
├── registry2908354347
└── registry57772754
6 directories, 2 files
Those registry-* folders are already saving data there
There was a problem hiding this comment.
Is it just metadata that goes in this dir? Or does it actually store large files?
There was a problem hiding this comment.
it will save the run-image in OCI layout format, it could have all the blobs depending on whether the user set the sparse flag or not. But it could have large files, for sure
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
0ac038e to
12c370a
Compare
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
Summary
This PR expose the functionality to end users to being able to export the application image to disk in OCI layout format. The final application image can be configured to contain all the blobs from the
run-image(default behavior) or using the-sparseflag the blobs from therun-imagewill be omitted.Output
full image saved on disk
Let's suppose the application was built using the following command
We can see the application was saved on disk in OCI layout format at folder
my-java-appimage saved on disk avoiding run-image blobs
On the other hand, if we used the
--sparseflag to export the imageThe output do not contain the
run-imageblobsBefore
The feature doesn't exist in previous version of pack
After
With this new PR, pack will have the following new behavior:
pack config experimental trueoci:<image-path>whenpack buildis invokedrun-imageblobs to be written on disk, they can passthrough the flag--sparse/$HOME/.pack/layout-repoto save therun-imagein OCI layout, this path will be mounted during lifecycle build execution.Documentation
Related
Resolves #1548