-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feat/add cruntime for machine sdk 17 use tar stream #17
Feat/add cruntime for machine sdk 17 use tar stream #17
Conversation
|
6bc2a85
to
4e4692e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do I test this?
it complains about cartesi/cruntime:0.1.0
. How do I build it?
apps/cli/src/commands/build.ts
Outdated
pack.entry({ name: "config.json" }, ociConfigJSON, function (err) { | ||
if (err) throw err; | ||
console.log("ERROR config.json"); | ||
pack.finalize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks out of place. because you will add more entries (for each gnuTar entry)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some changes in a fixup, but the .cartesi/app.ocibuindle.tar
is still incomplete.
I don't fully understand how these streams are supposed to work, something is missing to close/finish the tar, since I never hit the console.log()
at lines 388 and 392.
But .cartesi/app.ocibuindle.tar
has config.json
and rootfs/
prefix there.
When you build the cruntime package , you,d need to relabel :devel as :0.1.0
docker image tag cartesi/cruntime:devel cartesi/cruntime:0.1.0
Em seg., 6 de mai. de 2024, 20:10, Danilo Tuler ***@***.***>
escreveu:
… ***@***.**** commented on this pull request.
how do I test this?
it complains about cartesi/cruntime:0.1.0. How do I build it?
------------------------------
In apps/cli/src/commands/build.ts
<#17 (comment)>:
> @@ -419,29 +362,60 @@ Update your application Dockerfile using one of the templates at https://github.
appGnutarPath,
);
+ // prepare OCI Bundle
+ const extract = tar.extract();
+ const pack = tar.pack();
+ const appGnuTarStream = fs.createReadStream(appGnutarPath);
+ const appOCIBundleStream = fs.createWriteStream(appOCIBundlePath);
+ const ociConfigJSON = JSON.stringify(createConfig(imageInfo));
+
+ // add config.json
+ pack.entry({ name: "config.json" }, ociConfigJSON, function (err) {
+ if (err) throw err;
+ console.log("ERROR config.json");
+ pack.finalize();
this looks out of place. because you will add more entries (for each
gnuTar entry)
—
Reply to this email directly, view it on GitHub
<#17 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAC4UGJHPY6WQPDTXDFDLZA7IRHAVCNFSM6AAAAABHJO4D3OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANBRGQ4DMOJXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I recommend testing the |
Attempt to use tar-stream instead of nanotar.