-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Use unified Dockerfile for puppet/slaves images on different architectures. Simplified the build process, and add gradle tasks for them. Example: ./gradlew -POS=debian-9 -Pprefix=1.2.1 bigtop-puppet ./gradlew -POS=debian-9 -Pprefix=1.2.1 bigtop-slaves This will create proper images with same image name as existings on different HW architectures. This eases efforts for deploy and test. Change-Id: I183452324faf54808a4e88981d604d8fe119b51a Signed-off-by: Jun He <[email protected]> Signed-off-by: Evans Ye <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,38 @@ | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
FROM fedora:26 | ||
MAINTAINER [email protected] | ||
|
||
COPY puppetize.sh /tmp/puppetize.sh | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
if [ $# != 1 ]; then | ||
echo "Creates bigtop/puppet image" | ||
echo | ||
echo "Usage: build.sh <PREIX-OS-VERSION>" | ||
echo | ||
echo "Example: build.sh trunk-centos-7" | ||
echo " : build.sh 1.0.0-centos-7" | ||
exit 1 | ||
fi | ||
|
||
PREFIX=$(echo "$1" | cut -d '-' -f 1) | ||
OS=$(echo "$1" | cut -d '-' -f 2) | ||
VERSION=$(echo "$1" | cut -d '-' -f 3) | ||
ARCH=$(uname -m) | ||
if [ "${ARCH}" != "x86_64" ];then | ||
ARCH="-${ARCH}" | ||
else | ||
ARCH="" | ||
fi | ||
|
||
cp ../../bigtop_toolchain/bin/puppetize.sh . | ||
cat >Dockerfile <<EOF | ||
FROM ${OS}:${VERSION} | ||
MAINTAINER [email protected] | ||
COPY puppetize.sh /tmp/puppetize.sh | ||
RUN bash /tmp/puppetize.sh | ||
EOF | ||
|
||
docker build -t bigtop/puppet:${PREFIX}-${OS}-${VERSION}${ARCH} . | ||
rm -f Dockerfile puppetize.sh |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.