2025-01-16 00:49:43 +01:00
|
|
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base:17.1.0
|
|
|
|
# hadolint ignore=DL3006
|
|
|
|
FROM ${BUILD_FROM}
|
|
|
|
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
|
|
|
# Build arguments
|
|
|
|
ARG BUILD_ARCH
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG BUILD_DESCRIPTION
|
|
|
|
ARG BUILD_NAME
|
|
|
|
ARG BUILD_REF
|
|
|
|
ARG BUILD_REPOSITORY
|
|
|
|
ARG BUILD_VERSION
|
|
|
|
|
|
|
|
# Copy root filesystem
|
|
|
|
COPY rootfs /
|
|
|
|
|
|
|
|
# Install necessary dependencies
|
2025-01-16 01:05:03 +01:00
|
|
|
RUN apk add --no-cache gcc g++ make musl-dev linux-headers git python3 py3-pip curl
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
# Set the working directory
|
|
|
|
WORKDIR /freq
|
|
|
|
|
|
|
|
# Clone the Freqtrade repository
|
|
|
|
RUN git clone https://github.com/freqtrade/freqtrade.git /freq
|
|
|
|
# Optionally, switch to the stable branch for novice users
|
|
|
|
ARG FREQTRADE_BRANCH=stable
|
|
|
|
RUN git checkout ${FREQTRADE_BRANCH}
|
|
|
|
|
2025-01-16 01:05:03 +01:00
|
|
|
# Install Ta-lib
|
|
|
|
RUN chmod +x ./build_helpers/install_ta-lib.sh
|
|
|
|
RUN ./build_helpers/install_ta-lib.sh
|
2025-01-16 00:49:43 +01:00
|
|
|
|
2025-01-16 01:05:03 +01:00
|
|
|
RUN python3 -m venv .venv
|
|
|
|
RUN source /freq/.venv/bin/activate
|
|
|
|
|
|
|
|
RUN python3 -m pip install --upgrade pip
|
|
|
|
RUN python3 -m pip install -r requirements.txt
|
|
|
|
|
|
|
|
# install freqtrade
|
|
|
|
RUN python3 -m pip install -e .
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
# Activate the virtual environment (implicitly handled in entrypoint or CMD)
|
|
|
|
RUN echo "source /freq/.venv/bin/activate" >> ~/.bashrc
|
|
|
|
|
2025-01-16 01:05:03 +01:00
|
|
|
|
|
|
|
RUN pip install --user --no-cache-dir --no-build-isolation -r /freqtrade/tests/requirements.txt
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
RUN chmod +x /etc/s6-overlay/s6-rc.d/fqmbotnfix5/*
|
|
|
|
|
|
|
|
# Labels
|
|
|
|
LABEL \
|
|
|
|
io.hass.name="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
io.hass.description="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
io.hass.arch="${BUILD_ARCH}" \
|
|
|
|
io.hass.type="addon" \
|
|
|
|
io.hass.version="v0.0.0"\
|
|
|
|
maintainer="feres mezned" \
|
|
|
|
org.opencontainers.image.title="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
org.opencontainers.image.description="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
org.opencontainers.image.vendor="Home Assistant Local Add-ons" \
|
|
|
|
org.opencontainers.image.authors="Feres MEZNED" \
|
|
|
|
org.opencontainers.image.licenses="NO" \
|
|
|
|
org.opencontainers.image.url="https://mezgit.duckdns.org/mezned/HAddons" \
|
|
|
|
org.opencontainers.image.source="https://mezgit.duckdns.org/mezned/HAddons/freqtrade-NFIx5"
|
|
|
|
|