Unit in Docker as random user

Valentin V. Bartenev vbart at nginx.com
Tue Nov 10 10:31:16 UTC 2020


By default it uses the path configured during building:
https://unit.nginx.org/installation/#configuring-sources

Unit doesn't interpret "-" sign and in order to output to
stdout you should specify /dev/stdout or whatever used
inside a container.

  wbr, Valentin V. Bartenev


On Tuesday, 10 November 2020 13:18:11 MSK Tobias Genannt wrote:
> Hi,
> 
> I did some more testing with a debug build, like you suggested. It seems 
> that the problem is the --log parameter I used.
> 
> Run with:
> CMD ["unitd", "--no-daemon", "--control", "*:7777", "--pid", 
> "/opt/unit/unit.pid", "--state", "/opt/unit/state/", "--tmp", 
> "/opt/unit/tmp/", "--log", "-"]
> https://gist.github.com/tobiasge/2b1608574709619e7b6b897d93225313
> 
> 
> Run with:
> CMD ["unitd", "--no-daemon", "--control", "*:7777", "--pid", 
> "/opt/unit/unit.pid", "--state", "/opt/unit/state/", "--tmp", 
> "/opt/unit/tmp/", "--log", "/opt/unit/unit.log"]
> https://gist.github.com/tobiasge/da254adf02b2744edc5430265a372dad
> 
> 
> I run unit with "--no-daemon" because it will be the only process in my 
> container and I want all logging output go to stdout. When I give no 
> "--log" parameter unit wants to create a log in /var/log. That's why I 
> tried with "--log -".
> 
> 
> Kind regards,
> Tobias
> 
> On 10/11/2020 09:25, Valentin V. Bartenev wrote:
> > Hi,
> > 
> > In order to investigate this strange behaviour, please try to run Unit
> > with debug enabled.
> > 
> > See here for more information:
> > 
> >    https://unit.nginx.org/troubleshooting/#debug-log
> > 
> >   wbr, Valentin V. Bartenev
> > 
> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit
> 






More information about the unit mailing list