github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/service/runtime/cells/build.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 if [ ! $IMAGE ]; then 6 IMAGE=micro/cells 7 fi 8 9 echo ${PASSWORD} | docker login $DOCKER_DOMAIN -u ${USERNAME} --password-stdin 10 11 12 ls | while read dir; do 13 if [ ! -d ${dir} ]; then 14 continue 15 fi 16 if [ $DOCKER_DOMAIN ]; then 17 TAGPREFIX=$DOCKER_DOMAIN/ 18 fi 19 TAG=$TAGPREFIX$IMAGE:${dir} 20 21 pushd ${dir} &>/dev/null 22 echo Building $TAG 23 24 if [ ! -s Dockerfile ]; then 25 echo Skipping $TAG 26 popd &>/dev/null 27 continue 28 fi 29 30 docker buildx build --platform linux/amd64 --platform linux/arm64 --tag $TAG --push . 31 32 popd &>/dev/null 33 done