denyncrawford / dndb

A Deno 🦕 persistent, embeddable and optimized NoSQL database for JS & TS

Home Page:https://dndb.crawford.ml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permission denied!

opened this issue · comments

Hi!
I noticed a serious problem in Docker.
Any request to the DB crashes the app.

I write this Dockerfile:
the example is taken from: https://github.com/hayd/deno-docker


FROM hayd/alpine-deno:1.7.2
EXPOSE 8080
WORKDIR /app
USER deno
ADD . .
RUN deno cache --unstable app.js
CMD ["run", "--allow-read", "--allow-write", "--allow-net", "--unstable", "app.js"]

Build image docker build -t app . && docker run -it --init -p 8080:8080 app
... and see this errors:

If DB file NOT exist (Tested with CentOS & Alpine Linux)

alpine

If DB file exist

centOS

how can I fix this?

I found that the problem is not in DNDB, it is an access problem in Linux