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

Docker image for zoonavigator-web 0.6.0 results in Permission Denied #35

Closed
rajha-korithrien opened this issue Apr 8, 2019 · 6 comments
Milestone

Comments

@rajha-korithrien
Copy link

rajha-korithrien commented Apr 8, 2019

I have a Kubernetes based deployment of the prebuilt docker image
elkozmon/zoonavigator-web:0.6.0

When I deploy this image I get the following in the Pod logs:

2019/04/08 20:26:29 [emerg] 14#14: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

The container then exits with a non-zero exit status and Kubernetes redeploys it. We end up in an infinite loop :-)

Have I missed some instructions about needing to create some kind of volume mount?

@elkozmon
Copy link
Owner

elkozmon commented Apr 8, 2019

I'm sorry to hear that. You haven't missed anything I assure you. :)

I took a brief look at it and it seems that the issue here might be that the parent Docker image (nginx) requires to be run as root/privileged. I definitely intend to fix this if that's the case but until then I don't think I can help besides suggesting to lift the privileges, sorry.

@elkozmon
Copy link
Owner

elkozmon commented Apr 8, 2019

I'll just drop this link here in case it proves useful later on.
http://pjdietz.com/2016/08/28/nginx-in-docker-without-root.html

@elkozmon elkozmon added this to the 0.6.1 milestone Apr 8, 2019
@rajha-korithrien
Copy link
Author

rajha-korithrien commented Apr 9, 2019

I see,
I am in a position to help fix this if you would like.
If you would like me to help, what branch would you like me to start with?

It may be as straight forward as changing the docker image being used for nginx to nginxinc/nginx-unprivileged. I will test this and let you know if it works.

Thanks!

@elkozmon
Copy link
Owner

elkozmon commented Apr 9, 2019

Absolutely, I'd appreciate the help 👍

If it works with the alpine-based image from nginxinc, you can submit PR based on the master branch.

Thanks!

@rajha-korithrien
Copy link
Author

A PR has been submitted:
elkozmon/zoonavigator-web#9

Sorry to took so long.

@elkozmon
Copy link
Owner

Well done, thank you! I've merged it and published new version 0.6.1.

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