Skip to content

Commit 7de95ca

Browse files
authored
Merge pull request #1125 from afbjorklund/apptainer-home
Use APPTAINER_BINDPATH instead of APPTAINER_HOME
2 parents f654a0c + 6319c55 commit 7de95ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/apptainer.lima

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/bin/sh
22
set -eu
33
: "${LIMA_INSTANCE:=apptainer}"
4+
: "${APPTAINER_BINDPATH:=}"
45

56
if [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
67
echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE template://apptainer\` to create a new instance" >&2
78
exit 1
89
fi
910
export LIMA_INSTANCE
10-
exec lima APPTAINER_HOME="$HOME" apptainer "$@"
11+
if [ -n "$APPTAINER_BINDPATH" ]; then
12+
APPTAINER_BINDPATH="$APPTAINER_BINDPATH,"
13+
fi
14+
APPTAINER_BINDPATH="$APPTAINER_BINDPATH$HOME"
15+
exec lima APPTAINER_BINDPATH="$APPTAINER_BINDPATH" apptainer "$@"

0 commit comments

Comments
 (0)