Skip to content
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

Error occured during reporter init Error: EACCES: permission denied, mkdir '/app/data/storage' #728

Closed
adilsoncarvalho opened this issue Jun 14, 2020 · 3 comments

Comments

@adilsoncarvalho
Copy link

Since version 2.7.0 of the docker image is struggling to boot inside a Kubernetes cluster because of the lack of permissions.

Error occured during reporter init Error: EACCES: permission denied, mkdir '/app/data/storage'

image

@pofider
Copy link
Contributor

pofider commented Jun 14, 2020

Do you have your own image and inherit from jsreport base image? Do you have the data/templates inside your image?
Or do you mount to /app/data with templates stored externally?

@adilsoncarvalho
Copy link
Author

Hello @pofider,

I build my own image using jsreport image as the base one. I copy into /app/data my reports configuration. Here is my Dockerfile:

FROM jsreport/jsreport:2.6.1

COPY . /jsreport

RUN npm i sequelize pg

As I mentioned, this error started to show since 2.7.0, and when I build and run it locally with docker-compose it works, but when it tries to run inside Kubernetes, it fails.

Thank you for jumping into this.

@pofider
Copy link
Contributor

pofider commented Jun 15, 2020

Thank you for the additional details.
We now use a custom user to start node process inside docker instead of the root user.
This means you need to give the proper permissions to the files you copy to the image.
Like this:

COPY --chown=jsreport:jsreport . /jsreport

Its documented here
https://jsreport.net/learn/docker#customize-docker-image

I close this now, let me know if you need more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants