ej52/proxmox-scripts

Alpine 3.18 (Proxmox 8.1.3): Created LXC container has to few space (+instructions to get it running)

DoPeRaSo opened this issue · 0 comments

Script
nginx-proxy-manager

Describe the bug
OK, everyone knows the current issues, so no further need to explain. Current setups need more space (>2GB), so the create.sh has to be updated to e.g. 4GB for HDD.

All the other dependencies originate in NPM, so I guess, we should not complain anymore here. But: you can easily adept your script to work for "npm-only" containers by enforcing specific versions.

You can find my workaround below

System info:

  • Proxmox Version: [8.1.3]
  • Alpine Version: [3.18]

Work around
Create the LCX manually but assign more disk space. I used 4GB HDD, 1 core, 512 RAM, 0 swap.
Connect to the container and use older versions for specific packages from Alpine 3.16
Take care, I've used the most recent ones available today, but this may change. Keep an eye one them.

Here is the magic:

#User is not created automatically
adduser -S npm
addgroup -S npm
mkdir /run/nginx

#Add "old" alpine 3.16-versions - not sure, if all are required, but this is working - and I'm tied right now
apk add python3=3.10.13-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world
apk add python3-dev=3.10.13-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world
apk add nodejs=16.20.2-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world
apk add nodejs-dev=16.20.2-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world
apk add openssl=1.1.1w-r1 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world
apk add openssl-dev=1.1.1w-r1 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main --force-broken-world

#I guess you can just pipe it to sh as written in readme.md, but as I've tried I had to add some additional verbose-output..
wget -O "/tmp/npm_install.sh" "https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/install/alpine.sh"
chmod +x "/tmp/npm_install.sh"
/tmp/npm_install.sh

Have fun, but take care: I'm just not sure, if you should expose NPM to the Internet. I will only make it accessable through VPN. I tried to fix the dependencies but they are countless and some versions are so old, I just found no end.

But I'm not sure if this is only required during the build-process. Nevertheless, the installed nginx has all current security patches (openresty/1.21.4.3 at the time of writing) so the routing should be fine.