Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine - SSL Enviroment Variable - Using 'lxc-attach' instead of 'pct exec' #171

Open
pierretu opened this issue Feb 29, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@pierretu
Copy link

pierretu commented Feb 29, 2024

Is your feature request related to a problem? Please describe.
When creating a new container using this scripts will fail on updating the CT with apk at line 187 pct exec "$EPS_CT_ID" -- ash -c "apk add bash >/dev/null".
As it turns out 'pct exec' sets 2 new variables in the new CT:

  • SSL_CERT_DIR='/usr/lib/ssl/certs'
  • SSL_CERT_FILE='/usr/lib/ssl/cert.pem'
    Thereby the new alpine ct does not update or complete the install as alpine certs are in /etc/ssl/cert.pem.

Describe the solution you'd like
According to https://bugzilla.proxmox.com/show_bug.cgi?id=5194#c4 one could use lxc-attach -n 134 -- apk update instead of pct exec 134 apk update to bypass this "bug".

Describe alternatives you've considered
Another alternative from changing the code is to wait for the upstream fix to be rolled out.
https://lists.proxmox.com/pipermail/pve-devel/2024-January/061520.html

@pierretu pierretu added the enhancement New feature or request label Feb 29, 2024
@pierretu
Copy link
Author

pierretu commented Feb 29, 2024

I see that the lxc-attach command is used when installing the app, but not under container creation.
Using
lxc-attach -n "$EPS_CT_ID" -- apk add bash >/dev/null
instead of
pct exec "$EPS_CT_ID" -- ash -c "apk add bash >/dev/null"
gets the script to run and start the update process.

@pierretu pierretu reopened this Feb 29, 2024
@pierretu
Copy link
Author

pierretu commented Feb 29, 2024

Now I get an error on Openresty installation...

✔ Using LXC template: alpine-3.19-default_20240207_amd64.tar.xz
✔ LXC container 201 created successfully
✔ Operating System Updated
✔ Dependencies Installed
✔ Rust v1.74.0 Installed
✔ Python v3.11 and Pip v24.0 Installed
✘ Openresty not Installed

[ERROR] on line 153 with exit code 2 while executing command pkg_update

Do not know why the script /main/apps/nginx-proxy-manager/install.sh would cause that issue though.

EDIT: This error is due to Openresty not being updated to 3.19 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants