-
Notifications
You must be signed in to change notification settings - Fork 3
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
Building with ko instead of docker breaks the released image when an existing database is used #913
Comments
Thanks for researching the issue this thoroughly! With all this information, I agree with your proposal of failing forward. This decision is also made easier by the fact that the release of v4.0.0 is just days away, if at all. However, I would also like to revert back to Two questions:
|
Sounds like a good idea 👍
Ah sorry, I meant to write Dockerfile. Yes, we can delete
I didn't see any documentation that this is possible. I also didn't see any saying it is not. But my gut feeling is that it is not possible. |
ℹ️ I stopped my backend instance, ran |
I added the change back with #915, check the upgrade docs for v4.0.0. Thanks again for the research! |
Describe the bug
After upgrading to
v3.22.1
the backend crashes witherror during DB migration: attempt to write a readonly database
. This happens because the backend is now running as usernonroot
with uid and gid65532
(or at least that is what I think based on the documentation, see below).To Reproduce
Steps to reproduce the behavior:
v3.22.1
docker image.Expected behavior
The backend should not crash and it should be able to write to existing sqlite databases.
Additional context
docker
toko
. The existing Docker image is not used byko
at all, it can be deleted when usingko
.ko
usescgr.dev/chainguard/static
as base image for all builds by default (according to https://ko.build/configuration/#overriding-base-images).has a single user nonroot with uid 65532, belonging to gid 65532
.scratch
image with the default user/grouproot
.65532
does not have write permissions to the existing sqlite file.Switching to
scratch
withko
is not possibleko
to thescratch
image.Proposal
cgr.dev/chainguard/static
image only has a latest tag, so future changes in the base image could cause issues in the future. Though, the image should be fairly minimal overall. An alternative could be to use another base image or create our own.docker
in the meantime.The text was updated successfully, but these errors were encountered: