Install nginx in a privileged container

Zamana

Active Member
Dec 20, 2015
53
0
26
52
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.
 

Dunuin

Renowned Member
Jun 30, 2020
1,256
244
63
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.
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
14,943
717
133
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)
 

Zamana

Active Member
Dec 20, 2015
53
0
26
52
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?
 

Zamana

Active Member
Dec 20, 2015
53
0
26
52
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!