Install nginx in a privileged container

Zamana

Renowned Member
Dec 20, 2015
78
0
71
57
Hi!

After creating a privileged container with Debian 10 template image, I'm unable to install Nginx:

The most relevant part of the issue is here:

Code:
(...)
Setting up libnginx-mod-http-image-filter (1.14.2-2+deb10u3) ...
Setting up nginx-full (1.14.2-2+deb10u3) ...
Setting up nginx (1.14.2-2+deb10u3) ...
Processing triggers for systemd (241-7~deb10u5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Can't opendir(/dev/.lxc/sys/kernel): Permission denied
 at /usr/lib/x86_64-linux-gnu/perl5/5.28/Proc/ProcessTable.pm line 162.
Can't opendir(/dev/.lxc/sys/power): Permission denied
 at /usr/lib/x86_64-linux-gnu/perl5/5.28/Proc/ProcessTable.pm line 162.
Can't opendir(/dev/.lxc/sys/class): Permission denied
(...)


Can't opendir(/dev/.lxc/sys/kernel): Permission denied

What could be the cause of this error?

Thanks.
Regards.
 
If you want to run a webserver that is accessible from the internet, I really would recommend using a VM. They are way more secure compared to a LXC. Especially compared to a privileged LXC. And you won't need to solve problems like this.
 
After creating a privileged container with Debian 10 template image, I'm unable to install Nginx:

works here, tested on latest Proxmox VE 6.3 (privileged and unprivileged)
 
If you want to run a webserver that is accessible from the internet, I really would recommend using a VM. They are way more secure compared to a LXC. Especially compared to a privileged LXC. And you won't need to solve problems like this.
Hi!

Thanks for reply.

In this particular context, this webserver will work as a reverse proxy only, for an intranet site (so, no internet access). In this sense I could use Caddy for example (this idea just occurred to me now by reading your reply).

But, anyway, is there a way to fix this?
 
works here, tested on latest Proxmox VE 6.3 (privileged and unprivileged)
Hi!

So it seems that something that I installed affected the container ability to install Nginx.

I installed:
lsb-release, vim, docker and docker-compose.