dash/ci/dash/build-docker.sh
2022-07-01 09:02:53 +05:30

28 lines
802 B
Bash
Executable File

#!/usr/bin/env bash
export LC_ALL=C
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"/../.. || exit
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
DOCKER_TAG=${DOCKER_TAG:-latest}
DOCKER_RELATIVE_PATH=contrib/containers/deploy
BASE_BUILD_DIR=${BASE_BUILD_DIR:-.}
if [ -d $DOCKER_RELATIVE_PATH/bin ]; then
rm $DOCKER_RELATIVE_PATH/bin/*
fi
mkdir $DOCKER_RELATIVE_PATH/bin
cp "$BASE_BUILD_DIR"/src/dashd $DOCKER_RELATIVE_PATH/bin/
cp "$BASE_BUILD_DIR"/src/dash-cli $DOCKER_RELATIVE_PATH/bin/
cp "$BASE_BUILD_DIR"/src/dash-tx $DOCKER_RELATIVE_PATH/bin/
strip $DOCKER_RELATIVE_PATH/bin/dashd
strip $DOCKER_RELATIVE_PATH/bin/dash-cli
strip $DOCKER_RELATIVE_PATH/bin/dash-tx
docker build --pull -t "$DOCKER_IMAGE":"$DOCKER_TAG" -f $DOCKER_RELATIVE_PATH/Dockerfile docker