0a4b2f19e3
use --no-cache can save about 90M ``` ➜ freqtrade git:(develop) ✗ docker images freq REPOSITORY TAG IMAGE ID CREATED SIZE freq latest b15db8341067 7 minutes ago 800MB ➜ freqtrade git:(develop) ✗ docker images freq_nocache REPOSITORY TAG IMAGE ID CREATED SIZE freq_nocache latest e5731f28ac54 20 seconds ago 709MB ```
26 lines
742 B
Docker
26 lines
742 B
Docker
FROM python:3.7.0-slim-stretch
|
|
|
|
# Install TA-lib
|
|
RUN apt-get update && apt-get -y install curl build-essential && apt-get clean
|
|
RUN curl -L http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz | \
|
|
tar xzvf - && \
|
|
cd ta-lib && \
|
|
sed -i "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h && \
|
|
./configure && make && make install && \
|
|
cd .. && rm -rf ta-lib
|
|
ENV LD_LIBRARY_PATH /usr/local/lib
|
|
|
|
# Prepare environment
|
|
RUN mkdir /freqtrade
|
|
WORKDIR /freqtrade
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt /freqtrade/
|
|
RUN pip install numpy --no-cache-dir \
|
|
&& pip install -r requirements.txt --no-cache-dir
|
|
|
|
# Install and execute
|
|
COPY . /freqtrade/
|
|
RUN pip install -e . --no-cache-dir
|
|
ENTRYPOINT ["freqtrade"]
|