LbryNet: removes external torba dependency

This commit is contained in:
Ryan McGuire 2019-06-27 11:04:40 -04:00
parent 8b8e97b085
commit 0420f957f3

View file

@ -41,29 +41,25 @@ FROM dependencies as compile
ARG REPO=https://github.com/lbryio/lbry.git
ARG VERSION=master
ARG RUN_FROM_SOURCE=false
RUN python3.7 -m pip install -U pyinstaller && \
git clone ${REPO} /lbry && \
git -C /lbry checkout ${VERSION}
WORKDIR /lbry
RUN git clone https://github.com/lbryio/torba.git --depth 1 /lbry/torba
WORKDIR /lbry/torba
RUN python3.7 -m pip install -e .
WORKDIR /lbry/
git clone ${REPO} /lbry-sdk && \
git -C /lbry-sdk checkout ${VERSION}
RUN python3.7 -m pip install -e /lbry-sdk/torba
WORKDIR /lbry-sdk/lbry
COPY stuff/start.sh /usr/local/bin/start
COPY stuff/checkmount.sh /usr/local/bin/checkmount
RUN export TRAVIS_COMMIT=`git rev-parse HEAD` && \
python3.7 scripts/set_build.py && \
python3.7 -m pip install -e . && \
pyinstaller -F -n lbrynet lbrynet/extras/cli.py && \
chmod +x /lbry/dist/lbrynet && \
zip -j /lbry/dist/lbrynet-armhf.zip /lbry/dist/lbrynet && \
pyinstaller -F -n lbrynet lbry/extras/cli.py && \
chmod +x /lbry-sdk/lbry/dist/lbrynet && \
chmod a+x /usr/local/bin/* && \
mkdir /target && \
/lbry/dist/lbrynet --version
/lbry-sdk/lbry/dist/lbrynet --version
FROM ${BASE_IMAGE} as app
RUN adduser lbrynet --gecos GECOS --shell /bin/bash --disabled-password --home /home/lbrynet
COPY --from=compile /usr/local/bin/start /usr/local/bin/checkmount /lbry/dist/lbrynet /usr/local/bin/
COPY --from=compile /usr/local/bin/start /usr/local/bin/checkmount /lbry-sdk/lbry/dist/lbrynet /usr/local/bin/
EXPOSE 5279
USER lbrynet
ENTRYPOINT ["/usr/local/bin/checkmount"]