16 Feb
2021
16 Feb
'21
4:18 a.m.
Hi all, the following buildah script gives me some trouble to understand how to do it best: --- image_id=$(buildah from quay.io/centos/centos:stream8) run="buildah run $image_id --" set -e # works fine $run bash -c 'ls -l /var/cache/* /var/log/*' # does not work since * is not expanded $run ls -l "/var/cache/*" "/var/log/*" # does not work correctly $run rm -rf /var/cache/* /var/log/* #neither does $run rm -rf "/var/cache/*" "/var/log/*" # this works $run bash -c 'rm -rf /var/cache/* /var/log/*' # as can be seen with $run bash -c 'ls -l /var/cache/ /var/log/' ----- I am wondering how to correctly do this? using bash -c ? to make sure the globbing is done within the container and not outside? best mh