Skip to content

Commit 073aabe

Browse files
authored
Extend fix for #10 to Alpine as well as Busybox
1 parent 37df721 commit 073aabe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker2singularity.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ fi
174174
# making sure that any user can read and execute everything in the container
175175
echo "(7/9) Fixing permissions..."
176176
singularity exec --writable --contain $new_container_name /bin/sh -c "find /* -maxdepth 0 -not -path '/dev*' -not -path '/proc*' -not -path '/sys*' -exec chmod a+r -R '{}' \;"
177-
if grep -q Buildroot /etc/issue ; then
177+
buildname=$(head -n 1 /etc/issue)
178+
if [[ $buildname =~ Buildroot|Alpine ]] ; then
178179
# we're running on a Builroot container and need to use Busybox's find
179180
echo "We're running on BusyBox/Buildroot"
180181
singularity exec --writable --contain $new_container_name /bin/sh -c "find / -type f -or -type d -perm -u+x,o-x -not -path '/dev*' -not -path '/proc*' -not -path '/sys*' -exec chmod a+x '{}' \;"

0 commit comments

Comments
 (0)