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
Rails Error: Unable to access log file. #110
Comments
Do you happen to run any rails rake commands from the dockerfile? If so, those commands are run as root and will create a root owned log file. |
I've got
Looks like I just need to reverse the order of those RUNs and see what happens. If this is true how isn't everybody getting bitten by this? |
I have this issues also. In my Dockerfile I don't have any rake task RUNing. However, I do have the |
Should I need to change to
Or it should be like this
|
passenger-docker (and baseimage-docker, on which it is based) provides the
See the baseimage-docker documentation for more information about |
I'm starting to wonder if just skip all the USER and setuser and just put this at the end
I don't think it creates another image layer and because COPY is so dumb (always copies as root!, just found that out) you are going to need a chown in there anyway. |
That one line And the fix was as @FooBarWidget suggested, we can use @FooBarWidget: rake task should be
Thanks |
I don't know why rails/passenger is creating a root owned log production.log file. Using this container is the first time I've seen this.
Actually I wont be logging to production, I'm using the 12factor gem, but it looks like an unwritable production log screws up the process before anything can log to stdout and it all ends up in stdout.
Not using the 12factor gem gets me the same results so its not that. [EDIT] The 12factor gem is rightfully logging to stdout. So really the only issue I have now is the error message about being unable to log to a file I wouldn't be logging to anyway, but its still annoying :)
The text was updated successfully, but these errors were encountered: