File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 174174# making sure that any user can read and execute everything in the container
175175echo " (7/9) Fixing permissions..."
176176singularity 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- 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 '{}' \;"
177+ buildname= $( head -n 1 /etc/issue)
178+ if [[ $buildname =~ Buildroot| Alpine ]] ; then
179+ # we're running on a Builroot container and need to use Busybox's find
180+ echo " We're running on BusyBox/Buildroot"
181+ 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 '{}' \;"
182+ else
183+ echo " We're not running on BusyBox/Buildroot"
184+ singularity exec --writable --contain $new_container_name /bin/sh -c " find / -executable -perm -u+x,o-x -not -path '/dev*' -not -path '/proc*' -not -path '/sys*' -exec chmod a+x '{}' \;"
185+ fi
178186
179187echo " (8/9) Stopping and removing the container..."
180188docker stop $container_id
You can’t perform that action at this time.
0 commit comments