From 133fceeee5a48d8fc2eeb4a6ac21a1efcfbc8c75 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 20 Jun 2019 17:51:56 -0400 Subject: [PATCH] fixing docker build --- .travis.yml | 12 ++++++------ lbry/scripts/Dockerfile.wallet_server | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 466b07b34..07b06c076 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,11 +89,11 @@ jobs: env: OS=linux install: - pip3 install pyinstaller - - cd torba && pip3 install -e . && cd ../lbry + - cd torba && pip3 install -e . && cd .. + - cd lbry - python3 scripts/set_build.py - pip3 install -e . script: - - cd lbry - pyinstaller -F -n lbrynet lbrynet/extras/cli.py - chmod +x dist/lbrynet - zip -j dist/lbrynet-${OS}.zip dist/lbrynet @@ -126,13 +126,13 @@ jobs: before_install: - brew upgrade python || true - #- if: tag IS present - - stage: build + - if: tag IS present + stage: build name: "Wallet Server Docker Image - Tagged Release" script: - set -e - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - - travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f scripts/Dockerfile.wallet_server --build-arg TORBA_VERSION=${TORBA} . + - travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f lbry/scripts/Dockerfile.wallet_server . #- docker push lbry/wallet-server:$TRAVIS_TAG #- if: tag IS blank AND branch = master AND NOT type IN (pull_request) - stage: build @@ -140,7 +140,7 @@ jobs: script: - set -e - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - - travis_retry docker build -t lbry/wallet-server:master -f scripts/Dockerfile.wallet_server --build-arg TORBA_VERSION=${TORBA} . + - travis_retry docker build -t lbry/wallet-server:master -f lbry/scripts/Dockerfile.wallet_server . #- docker push lbry/wallet-server:master cache: diff --git a/lbry/scripts/Dockerfile.wallet_server b/lbry/scripts/Dockerfile.wallet_server index b4d9a4815..3739e147f 100644 --- a/lbry/scripts/Dockerfile.wallet_server +++ b/lbry/scripts/Dockerfile.wallet_server @@ -1,7 +1,6 @@ FROM debian:buster-slim ARG user=lbry -ARG TORBA_VERSION=master # create an unprivileged user RUN groupadd -g 999 $user && useradd -r -u 999 -g $user $user @@ -23,9 +22,6 @@ WORKDIR /home/$user # RUN pip3 install -U pip (broken on pip 10 https://github.com/pypa/pip/issues/5240) RUN python3.7 -m pip install --upgrade pip setuptools -# get torba -RUN python3.7 -m pip install --user git+https://github.com/lbryio/torba.git@${TORBA_VERSION}#egg=torba - # get uvloop RUN python3.7 -m pip install --user uvloop @@ -35,7 +31,9 @@ COPY . projects/lbry USER root RUN chown -R $user:$user . USER $user -WORKDIR projects/lbry +WORKDIR projects/lbry/torba +RUN python3.7 -m pip install --user . +WORKDIR projects/lbry/lbry RUN python3.7 -m pip install --user -e . && rm ~/.cache -rf # entry point