blob: 15019bc23aa99ad19557b66ed07bf57423de7977 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/env bash
set -e
set -o pipefail
# This removes the old test containers, and builds a new ostro container.
# If you do not have the deps containers, it will build them but this takes awhile
# it does NOT remove the deps images
#
# Example:
#
# ./scripts/build_containers.ostro
TOPDIR=`git rev-parse --show-toplevel`
# remove ostro builder image as we will rebuild it
Q=`docker images -q crops/ostro:builder`
if [ "$Q" != "" ]; then
echo "Removing ostro image"
docker rmi -f $Q
fi
cd ${TOPDIR}/dockerfiles;
Q=`docker images -q crops/ostro:deps`
if [ "$Q" == "" ]; then
echo "Build ostro deps image"
docker build -t crops/ostro:deps -f Dockerfile.ostro.deps --rm=true ..
fi
Q=`docker images -q crops/ostro:builder`
if [ "$Q" == "" ]; then
echo "Build ostro builder image"
docker build -t crops/ostro:builder -f Dockerfile.ostro --rm=true ..
fi
|