File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -195,9 +195,11 @@ action_deploy() {
195
195
# Clean up services on exit
196
196
trap cleanup_on_exit EXIT
197
197
198
- # Check if any Dockerfiles exist
199
- dockerfiles=$( ls Dockerfile* 2> /dev/null)
200
- if [[ -n " $dockerfiles " ]]; then
198
+ # Check if any Dockerfiles exist (using safer glob handling)
199
+ shopt -s nullglob
200
+ dockerfiles=( Dockerfile* )
201
+ shopt -u nullglob
202
+ if [[ ${# dockerfiles[@]} -gt 0 ]]; then
201
203
# Bring up a local docker registry
202
204
if [ -z " $( docker ps -q -f name=$spin_registry_name ) " ]; then
203
205
# Ensure the registry cache directory exists with the correct user and group ID
@@ -228,6 +230,8 @@ action_deploy() {
228
230
exit 1
229
231
fi
230
232
done
233
+ else
234
+ echo " ${BOLD}${YELLOW} 🐳 No Dockerfiles found in the directory. Skipping Docker image build...${RESET} "
231
235
fi
232
236
233
237
# Get deployment host information
You can’t perform that action at this time.
0 commit comments