how to persist data with deno kv when running a docker container?
I’m building a deno project using only the built-in deno kv. I know you can also use the self-hosted backend, but for now that's outside of my scope
I want to containerize the app with docker using a single
Dockerfile
for simplicity
what I need help with:
- how to persist the local kv data across container runs
- ensuring the non-root deno user can read from and write to the volume where data is stored
currently I have something like:
This works, but I have to run the container with the root user (instead of passing the instruction USER deno
).
Any guidance or examples would be appreciated!0 Replies