-
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: initial draft of the Dockerfile alternative #26
Conversation
Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
The build command I'm currently using is the following: docker buildx build -t basementdevs/scylla-studio . |
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.
LGTM!
Copilot SummaryThis pull request includes significant updates to Docker support, dependency management, and code formatting. The most important changes include the addition of a Dockerfile, updates to the Docker Support:
Documentation:
Code Formatting and Dependency Management:
Component Refactoring:
Database Path Adjustment: |
I tried building on this branch locally and got this error. Error: The module '/app/node_modules/.pnpm/better-sqlite3@11.3.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 115. This version of Node.js requires
NODE_MODULE_VERSION 127. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Module._extensions..node (node:internal/modules/cjs/loader:1717:18)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at mod.require (/app/node_modules/.pnpm/next@14.2.13_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/require-hook.js:65:28)
at require (node:internal/modules/helpers:135:16)
at bindings (/app/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js:112:48)
at new Database (/app/node_modules/.pnpm/better-sqlite3@11.3.0/node_modules/better-sqlite3/lib/database.js:48:64) {
code: 'ERR_DLOPEN_FAILED',
digest: '948557867'
} Also, why create another user with these IDs?
|
I took this base docker image from elsewhere, but I'm not sure why the new user though. About the error, that's odd. Can you try to add |
from roughly 1GB to <180MB Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
I managed to get a working image with less than 200 MiB with |
Was going to recommend that before leaving stream yesterday in case distroless was not a success. Glad you got it work :) Congrats. <200mb is fine for a nodejs image. Try: https://github.com/wagoodman/dive to explore your image, you will see that nodejs alone is 110+MiB edit: I just tried your image, it still spews the same error.
I'll give it another spin later to see if I can figure out what is crashing. |
Is there any chance of that being a cache problem? I'll try to prune what I have here and test again to see if I can reproduce it. It would be a good idea if @gvieira18 or @danielhe4rt could test it too. |
I tested on my local machine and it worked fine. I built and ran manually with |
Tested locally and worked as expected. docker build \
--label "org.opencontainers.image.source=https://github.com/basementdevs/scylla-studio" \
--label "org.opencontainers.image.created=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--tag "basementdevs/scylla-studio:main" \
--tag "basementdevs/scylla-studio:develop" \
--progress=plain \
--file Dockerfile \
. |
Very likely something is wrong on my machine (macos aarch64). This means distroless also worked 🙈 lol. |
I couldn't make the distroless one work on my machine, that's why I tried to move to this one. Hopefully it will work on mac eventually, lol. 🙏 |
Remaining tasks
npm
release and GitHub NPM RegistryThe goal is the following:
alpine
to save some space. [@gvieira18]Running Scylla Studio via Docker
You can run Scylla Studio directly through Docker without setting up the entire environment. To do this, run the following one-liner:
docker run --rm --name scylla-studio --network="host" ghcr.io/basementdevs/scylla-studio:latest
Persistent Volumes
If you'd like to keep the session data and logs between runs, you can use Docker volumes:
docker run --rm --name scylla-studio --network="host" \ -v scylla-studio-data:/usr/app/data \ ghcr.io/basementdevs/scylla-studio:latest
This will create a persistent volume named
scylla-studio-data
for the application's data.To remove the volume later: