Revise docker scripts to use optional dockfiles

This commit is contained in:
Neal Chambers
2024-11-09 09:10:09 +09:00
parent 15c920c911
commit 151fc7bf85
2 changed files with 10 additions and 2 deletions

View File

@@ -4,5 +4,9 @@ set -e
# This script builds the Docker container, seeds the app with sample data, and logs the screen output.
DATE=`date +%Y%m%d-%H%M%S-%3N`
docker/build-log 2>&1 | tee log/build-$DATE.log
if [ -n "$1" ]; then
docker/build-log $1 2>&1 | tee log/build-$DATE.log
else
docker/build-log 2>&1 | tee log/build-$DATE.log
fi
docker/seed 2>&1 | tee log/seed-$DATE.log

View File

@@ -6,7 +6,11 @@ wait
echo '###########################'
echo 'BEGIN: docker compose build'
echo '###########################'
docker compose build # Set up the Docker containers
if [ -n "$1" ]; then
docker build -f $1 . # Set up the Docker containers
else
docker compose build # Set up the Docker containers
fi
echo '##############################'
echo 'FINISHED: docker compose build'
echo '##############################'