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 --"
# 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/*
$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?
Show replies by date