11#! /bin/bash
22
3- buildVersion () {
3+ if [ " ${MINIMESOS_DOCKER_VERSION} " == " " ]
4+ then
5+ echo " Please set MINIMESOS_DOCKER_VERSION before building"
6+ exit 1
7+ fi
8+
9+ buildImage () {
10+ MESOS_VERSION=$1
11+ MESOSPHERE_TAG=$2
12+
413 for role in agent master; do
514 echo
6- echo Building containersol/mesos-${role} :${1}
15+ echo Building containersol/mesos-${role} -${MESOS_VERSION} :${MINIMESOS_DOCKER_VERSION}
16+ docker build \
17+ -t containersol/mesos-${role} -${MESOS_VERSION} :${MINIMESOS_DOCKER_VERSION} \
18+ -f mesos-image/${role} /Dockerfile \
19+ --build-arg MESOS_VERSION=${MESOS_VERSION} -${MESOSPHERE_TAG} \
20+ . || exit $?
721 docker build \
8- -t containersol/mesos-${role} : ${1} \
22+ -t containersol/mesos-${role} - ${MESOS_VERSION} :latest \
923 -f mesos-image/${role} /Dockerfile \
10- --build-arg MESOS_VERSION=${1 } \
24+ --build-arg MESOS_VERSION=${MESOS_VERSION} - ${MESOSPHERE_TAG } \
1125 . || exit $?
1226 done
1327}
@@ -17,13 +31,14 @@ docker build \
1731 alpine3.3-java8-jre || exit $?
1832
1933docker build \
20- -t containersol/mesos-base:0.1.0 \
34+ -t containersol/mesos-base:${MINIMESOS_DOCKER_VERSION} \
2135 -f base/Dockerfile \
2236 . || exit $?
2337
24- buildVersion " 0.25.0-0.2.70.ubuntu1404"
25- buildVersion " 0.26.0-0.2.145.ubuntu1404"
26- buildVersion " 0.27.0-0.2.190.ubuntu1404"
27- buildVersion " 0.27.1-2.0.226.ubuntu1404"
28- buildVersion " 0.28.0-2.0.16.ubuntu1404"
29- buildVersion " 0.28.1-2.0.20.ubuntu1404"
38+ # Mesos version Mesosphere tag
39+ buildImage " 0.25.0" " 0.2.70.ubuntu1404"
40+ buildImage " 0.26.0" " 0.2.145.ubuntu1404"
41+ buildImage " 0.27.0" " 0.2.190.ubuntu1404"
42+ buildImage " 0.27.1" " 2.0.226.ubuntu1404"
43+ buildImage " 0.28.0" " 2.0.16.ubuntu1404"
44+ buildImage " 0.28.1" " 2.0.20.ubuntu1404"
0 commit comments