Open bast opened 4 months ago
Bootstrap: docker
From: ubuntu:24.04
%post
apt-get update -y
apt install -y curl
%runscript
curl https://example.com > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Internet connection is available from the container."
else
echo "No internet connection from the container."
fi
%help
Try with and without network:
$ singularity run test.sif
$ singularity run --net --network=none test.sif
This might need few adaptations but we need to: