bugfixes and cleanup from kenyaemr

- fix monitor script
- fix to allow docker build-image script to run from outside folder
- split instance configuration out of start script
This commit is contained in:
2024-03-14 16:27:56 -07:00
parent 50cb23a4c7
commit 6c59b1ab76
5 changed files with 68 additions and 20 deletions
+6 -5
View File
@@ -69,7 +69,7 @@ fi
# if not specified, process all docker files
if [ ${#DOCKERFILES[@]} -eq 0 ]; then
DOCKERFILES=($(find ${LOCATION} -maxdepth 1 -name "Dockerfile.*" -exec basename {} \;))
DOCKERFILES=($(find ${LOCATION} -maxdepth 1 -name "Dockerfile.*"))
fi
# process dockerfiles one at a time
@@ -78,9 +78,10 @@ for f in ${DOCKERFILES[@]}; do
echo "Processing file '$f'"
# extract remaining info from filename
basename=${f%.*}
filename=$(basename $f)
basename=${filename%.*}
name=${basename:11}
arch=${f##*.}
arch=${filename##*.}
platform="linux/${arch}"
tag=${TAG_BASENAME}/${name}/${arch}:${VERSION_NAME}
echo " name: '${name}'"
@@ -88,8 +89,8 @@ for f in ${DOCKERFILES[@]}; do
echo " tag: '${tag}'"
# build the image
echo "docker build --platform ${platform} -f ${LOCATION}/${f} -t ${tag} ${LOCATION}"
docker build --platform ${platform} -f ${LOCATION}/${f} -t ${tag} ${LOCATION}
echo "docker build --platform ${platform} -f $f -t ${tag} ${LOCATION}"
docker build --platform ${platform} -f $f -t ${tag} ${LOCATION}
# push image if requested build was successful
if [ $? -eq 0 ] && [ "${PUSH_IMAGES}" = "1" ];then