You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
619 B
21 lines
619 B
#!/bin/bash
|
|
|
|
for file in Dockerfile*
|
|
do
|
|
app=$(echo $file | sed 's/Dockerfile.//g')
|
|
docker build -f $file . || exit 1
|
|
export TAG=$(docker images|grep -v REPO|head -n1|awk '{print $3}')
|
|
docker tag $TAG localhost:5000/$app:latest || exit 1
|
|
docker push localhost:5000/$app:latest || exit 1
|
|
done
|
|
|
|
docker-compose -f ../dockprom/docker-compose.yml down --remove-orphans || exit 1
|
|
|
|
for file in Dockerfile*
|
|
do
|
|
app=$(echo $file | sed 's/Dockerfile.//g')
|
|
for i in $(docker images|grep $app|awk '{print $3}') ; do docker rmi $i ; done || exit 1
|
|
done
|
|
|
|
|
|
docker-compose -f ../dockprom/docker-compose.yml up -d || exit 1
|
|
|