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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

22 lines
619 B

4 years ago
#!/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