Unit in Docker as random user

Valentin V. Bartenev vbart at nginx.com
Tue Nov 10 08:25:57 UTC 2020


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


On Tuesday, 10 November 2020 10:47:08 MSK Tobias Genannt wrote:
> 
> Hello,
> 
> I'm having some trouble with running unit in a Docker container as an 
> unprivileged (random) user. The image will run in Openshift later, 
> that's why I have a random user. In my Docker file I have the following:
> 
> ...
> RUN mkdir -p /opt/unit/state/ /opt/unit/tmp/ && chmod -R a+w /opt/unit/
> ...
> CMD ["unitd", "--no-daemon", "--control", "*:7777", "--pid", 
> "/opt/unit/unit.pid", "--state", "/opt/unit/state/", "--tmp", 
> "/opt/unit/tmp/", "--log", "-"]
> 
> When I run the image I get the following output:
> 2020/11/10 07:31:08 [warn] 1#1 Unit is running unprivileged, then it 
> cannot use arbitrary user and group.
> 2020/11/10 07:31:08 [info] 1#1 unit started
> 2020/11/10 07:31:08 [alert] 1#1 unlink("/opt/unit/unit.pid") failed (2: 
> No such file or directory)
> 
> There are no error, unitd just quit with exit code 1. What am I doing 
> wrong here and how do I get some more information out of the process to 
> find the error?
> 
> Kind regards,
> Tobias
> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit
> 






More information about the unit mailing list