79375226

Date: 2025-01-21 16:54:29
Score: 0.5
Natty:
Report link

As I was attempting to build the image with sudo the environment variables specified in ~/.bashrc were not there, as by default sudo resets the environment and creates a minimal environment with variables specified in /etc/environment . To bypass this, there is a -E flag in sudo. Thus,

sudo -E singularity build --bind /etc/ssl:/etc/ssl    image/python.3.12.2.debian.sif     def/python.3.12.2.debian.def

has solved the issue. --bind is still required to access certificates from inside the container.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: M K