2017-03-07 04:36:41 -05:00
|
|
|
#!/bin/bash
|
|
|
|
set -eux -o pipefail
|
|
|
|
|
|
|
|
# Set up env
|
2017-05-12 04:15:08 -04:00
|
|
|
source "`dirname $0`/_env.sh"
|
2017-03-07 04:36:41 -05:00
|
|
|
readonly defaultImageNameAndTag="aio-builds:latest"
|
|
|
|
|
2017-06-24 16:26:25 -04:00
|
|
|
# Build `scripts-js/`
|
|
|
|
# (Necessary, because only `scripts-js/dist/` is copied to the docker image.)
|
|
|
|
(
|
|
|
|
cd "$SCRIPTS_JS_DIR"
|
|
|
|
yarn install
|
|
|
|
yarn build
|
|
|
|
)
|
|
|
|
|
2017-03-07 04:36:41 -05:00
|
|
|
# Create docker image
|
|
|
|
readonly nameAndOptionalTag=${1:-$defaultImageNameAndTag}
|
|
|
|
sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR
|