dockerfile / nginx

Nginx Dockerfile for trusted automated Docker builds.
http://dockerfile.github.io/#/nginx
MIT License
479 stars 537 forks source link

nginx Container Open (13: Permission Denied) #20

Closed midnightconman closed 4 years ago

midnightconman commented 9 years ago

I am trying to setup a private docker registry and I am getting this error from my nginx docker container:

2015/07/01 19:40:29 [crit] 6#0: *17 open() "/var/cache/nginx/client_temp/0000000001" failed (13: Permission denied)

I have verified that /var/cache/nginx/client_temp is writeable by nginx user. I have also added this to my dockerfile:

RUN chown +R nginx /var/cache/nginx

To make sure that nginx user has recursive permissions to this folder. Any ideas of what I can try next?

hankerepo commented 9 years ago

try setting selinux to permissive

githubdacer commented 5 years ago

It worked for me as a workaround, but no sure which should be the right SELinux context to used?

githubdacer commented 5 years ago

Hi, in /var/log/audit/audit.log you can see the error, and know which is the context, later on with semanage, you can configure the right context, that in my case was container_t.

midnightconman commented 4 years ago

This issue is stale, closing. :smile: