-
Notifications
You must be signed in to change notification settings - Fork 12
SDK image = runtime image + development utilities #194
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
Conversation
🦋 Changeset detectedLatest commit: b842d98 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1129770 to
1c04a25
Compare
tuler
left a comment
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 think the order should be something like:
FROM debian as runtime
# add cartesi-machine
# add cartesi-rollups-node
# add graphql
# add espresso-reader
FROM runtime as sdk
# add anvil
# add devnet
# add crane
# add genext2fsx
# add migrations
| } | ||
|
|
||
| target "rollups-node" { | ||
| tags = ["cartesi/sdk-node:devel"] |
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.
let's discuss a bit more on this name
Yeah, I decided to use The order you suggested makes the code more clean at the expense of some MB in the final sdk image. |
823490b to
cdfc3c6
Compare
Just accepted your suggestion after evaluating the size difference was negligible. |
5343b63 to
2c9ae08
Compare
|
We still need to define the naming, and we make the final fixups to stick with whatever naming is decided. |
| @@ -0,0 +1,91 @@ | |||
| name: rollups-database | |||
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.
use database and database.yaml to follow name convention.
packages/sdk/Dockerfile
Outdated
| cartesi | ||
| EOF | ||
|
|
||
| RUN mkdir -p /tmp/.cartesi && chmod 1777 /tmp/.cartesi |
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 think we don't need this anymore
| EOF | ||
|
|
||
| COPY --from=runtime /usr/bin/cartesi-rollups-cli /usr/bin/ | ||
| COPY --from=runtime /usr/lib/libcartesi* /usr/lib/ |
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.
is this safe? why is it needed?
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.
We need this to run cartesi-rollups-cli without the need to reinstall its package.
| USER root | ||
| ARG DEBIAN_FRONTEND=noninteractive | ||
| RUN <<EOF | ||
| apt-get update |
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.
some of the packages below were already installed by runtime base
|
Here is a commit organization that may be better to review and merge: A commit with only the Dockerfile. No other change is necessary to the workflows, as the final default target is the sdk as it is today. That is already mergable by itself. Then we handle the case for |
A container image will be released only with the binaries needed to run a rollups-node with optional auxiliary services like rollups-graphql and espresso-reader.
This container image will be based on postgres and contains a pre-initialized database with rollups-node, rollups-graphql and espresso-reader database migrations ready to be used.
1ae64db to
113129b
Compare
There's a PR attempt for that at #207 |
Another PR for that: #209 |
|
Superseded by #209 |
This pull request includes several changes to the
@cartesi/sdkpackage, focusing on updating Docker images, adding new workflows, and modifying the Dockerfile. The most important changes include adding new container image releases, updating base images, creating databases with migrations, and adding new GitHub workflows for building and pushing Docker images.Updates to Docker images and base images:
bookworm-20250317-slimin.changeset/honest-spoons-appear.mdandpackages/sdk/docker-bake.hcl. [1] [2]cartesi/rollups-databaseand updated the Dockerfile to use new base images forcartesi,espresso-dev-node, andpostgres. [1] [2] [3] [4] [5]Database migrations:
.changeset/hot-timers-repair.md.rollupsdb,graphql, andespresso.New GitHub workflows:
rollups-database.ymlandruntime.ymlworkflows to build and push Docker images forrollups-databaseandsdk-node. [1] [2]Dockerfile modifications:
Docker bake configuration:
docker-bake.hclanddocker-bake.override.hclto include new targets forruntimeanddatabase, and set appropriate tags for the images. [1] [2]