fixing docker build

This commit is contained in:
Lex Berezhny 2019-06-20 17:51:56 -04:00
parent 38331b8918
commit 133fceeee5
2 changed files with 9 additions and 11 deletions

View file

@ -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:

View file

@ -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