mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
build technical image
This commit is contained in:
parent
af7283017b
commit
0535660db7
6
Dockerfile.technical
Normal file
6
Dockerfile.technical
Normal file
|
@ -0,0 +1,6 @@
|
|||
FROM freqtradeorg/freqtrade:develop
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install git \
|
||||
&& apt-get clean \
|
||||
&& pip install git+https://github.com/berlinguyinca/technical
|
|
@ -1,10 +1,8 @@
|
|||
#!/bin/sh
|
||||
# Tag with travis build
|
||||
TAG=$TRAVIS_BUILD_NUMBER
|
||||
# - export TAG=`if [ "$TRAVIS_BRANCH" == "develop" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
|
||||
# Replace / with _ to create a valid tag
|
||||
TAG=$(echo "${TRAVIS_BRANCH}" | sed -e "s/\//_/")
|
||||
|
||||
TAG_TECH="${TAG}_technical"
|
||||
|
||||
# Pull last build to avoid rebuilding the whole image
|
||||
docker pull ${REPO}:${TAG}
|
||||
|
@ -23,6 +21,10 @@ if [ $? -ne 0 ]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
# build technical image
|
||||
sed -i Dockerfile.technical -e "s/FROM freqtradeorg\/freqtrade:develop/FROM freqtradeorg\/freqtrade:${TAG}/"
|
||||
docker build --cache-from freqtrade:${TAG} -t ${IMAGE_NAME}:${TAG_TECH} -f Dockerfile.technical .
|
||||
|
||||
# Tag image for upload
|
||||
docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -31,7 +33,7 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
|
||||
# Tag as latest for develop builds
|
||||
if [ "${TRAVIS_BRANCH}" == "develop" ]; then
|
||||
if [ "${TRAVIS_BRANCH}" = "develop" ]; then
|
||||
docker tag freqtrade:$TAG ${IMAGE_NAME}:latest
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user