neobytes/docker/build-docker.sh
Alexander Block e805f790e3 Automatically build and push docker image to docker.io/dashpay/dashd-develop (#1809)
* Automatically build and push docker image to dashpay/dashd-develop

* Remove DOCKER_REPO env var from .travis.yml and add new-line to .gitignore

This should not have been there and results in errournous pushes to
"dashpay/dashd/dashpay/dashd-develop".

Also add missing new-line in .gitignore

* Fix Travis build failures happening due to large writes to stdout

Travis issue: https://github.com/travis-ci/travis-ci/issues/4704

Build failure happened since the introduction of secrets in .travis.yml

* Fix BUILD_DIR

Due to changes in develop the build dir has changed to be just "build".

* Remove bogus upload example from .travis.yml

* Switch to pushing on "develop" branch

Used "pr_docker" before for testing purposes.

* Only push docker image when TRAVIS_PULL_REQUEST = false
2018-01-10 12:17:43 +03:00

21 lines
500 B
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
DOCKER_TAG=${DOCKER_TAG:-latest}
BUILD_DIR=${BUILD_DIR:-.}
rm docker/bin/*
mkdir docker/bin
cp $BUILD_DIR/src/dashd docker/bin/
cp $BUILD_DIR/src/dash-cli docker/bin/
cp $BUILD_DIR/src/dash-tx docker/bin/
strip docker/bin/dashd
strip docker/bin/dash-cli
strip docker/bin/dash-tx
docker build --pull -t $DOCKER_IMAGE:$DOCKER_TAG -f docker/Dockerfile docker