-
Notifications
You must be signed in to change notification settings - Fork 719
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
ZINC_DATA_PATH is not writable #512
Comments
can you try:
|
This is caused by wrong To solve this, overwrite the Zinc image user with the
If you are also planning using Zinc in Docker Compose or Docker Swarm use the |
Ok, great, thank you for the workaround. But I think you should fix this. You can't use a user without root and then break the deployment / require workarounds for it. I uploaded a gist on how we prevent this from happening in our images. Please have a look and see if it is any use for you: Create image without root user and folder access |
I agree with @jwillmer (sorry but I'm not a Zinc contributor only humble Zinc user). Zinc team should create and add default directory with ownership for |
@jwillmer i saw the link, if you don't mount directory it can work. But if you mount outside directory, in container we are nothing can do except use root user for zinc. You can run zinc without mount directory, it no need create directory and give it permission:
|
@jwillmer, Thanks, i will fix it. |
It fixes zincsearch#512 Changed user and group to zinc:zinc to match general convention used in other services like rabbitmq, mysql, etc.. Added default ZINC_DATA_PATH=/var/lib/zinc. It follows Linux filesystem hierarchy convention: https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html
@hengfeiyang I have created a proper Pull Request that will fix this #516
I can also create Pull Request for Zinc documentation to encourage people to use named volumes rather that host source paths. If someone really want to use host source path (I discourage it):
I would not recommended to add |
* Add persistent location with proper permissions It fixes #512 Changed user and group to zinc:zinc to match general convention used in other services like rabbitmq, mysql, etc.. Added default ZINC_DATA_PATH=/var/lib/zinc. It follows Linux filesystem hierarchy convention: https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html * Change default Zinc data to /data * Add persistent directory in other Dockerfiles
What were you trying to achieve?
Running the docker image
What action did you take?
Running stock example with mapped valume path returns error. Same is true if I don't specify any volume mount.
What action/response/output did you expect?
Running app
What actually happened?
How to reproduce the issue?
Just start it
What version of ZincSearch are you using?
I tried with latest and 0.3.1
Anything else that you can tell that will help us diagnose and resolve the issue efficiently?
I am running a ubuntu server.
The text was updated successfully, but these errors were encountered: