1#!/bin/sh
 2set -o xtrace
 3set -e
 4
 5if [ $# -ne 1 ]; then
 6    echo "Usage: build_chart_image.sh <DIR>"
 7    exit 1
 8fi
 9
10SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
11
12#docker build -t chart_base:latest -f Dockerfile_chart_base "${SCRIPTDIR}"
13
14D="$(realpath $1)"
15
16cd $D
17cat << EOF > .dockerignore
18**
19!chart/**
20!chartepssg/**
21EOF
22
23docker build -t chart_base:latest -f "${SCRIPTDIR}"/Dockerfile_chart_base .
24
25docker build -t chartepssg:latest -f "${SCRIPTDIR}"/Dockerfile_chartepssg .
26rm .dockerignore