fixing docker build
This commit is contained in:
parent
38331b8918
commit
133fceeee5
2 changed files with 9 additions and 11 deletions
12
.travis.yml
12
.travis.yml
|
@ -89,11 +89,11 @@ jobs:
|
||||||
env: OS=linux
|
env: OS=linux
|
||||||
install:
|
install:
|
||||||
- pip3 install pyinstaller
|
- pip3 install pyinstaller
|
||||||
- cd torba && pip3 install -e . && cd ../lbry
|
- cd torba && pip3 install -e . && cd ..
|
||||||
|
- cd lbry
|
||||||
- python3 scripts/set_build.py
|
- python3 scripts/set_build.py
|
||||||
- pip3 install -e .
|
- pip3 install -e .
|
||||||
script:
|
script:
|
||||||
- cd lbry
|
|
||||||
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
||||||
- chmod +x dist/lbrynet
|
- chmod +x dist/lbrynet
|
||||||
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet
|
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet
|
||||||
|
@ -126,13 +126,13 @@ jobs:
|
||||||
before_install:
|
before_install:
|
||||||
- brew upgrade python || true
|
- brew upgrade python || true
|
||||||
|
|
||||||
#- if: tag IS present
|
- if: tag IS present
|
||||||
- stage: build
|
stage: build
|
||||||
name: "Wallet Server Docker Image - Tagged Release"
|
name: "Wallet Server Docker Image - Tagged Release"
|
||||||
script:
|
script:
|
||||||
- set -e
|
- set -e
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
- 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
|
#- docker push lbry/wallet-server:$TRAVIS_TAG
|
||||||
#- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
#- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
||||||
- stage: build
|
- stage: build
|
||||||
|
@ -140,7 +140,7 @@ jobs:
|
||||||
script:
|
script:
|
||||||
- set -e
|
- set -e
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
- 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
|
#- docker push lbry/wallet-server:master
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
ARG user=lbry
|
ARG user=lbry
|
||||||
ARG TORBA_VERSION=master
|
|
||||||
|
|
||||||
# create an unprivileged user
|
# create an unprivileged user
|
||||||
RUN groupadd -g 999 $user && useradd -r -u 999 -g $user $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 pip3 install -U pip (broken on pip 10 https://github.com/pypa/pip/issues/5240)
|
||||||
RUN python3.7 -m pip install --upgrade pip setuptools
|
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
|
# get uvloop
|
||||||
RUN python3.7 -m pip install --user uvloop
|
RUN python3.7 -m pip install --user uvloop
|
||||||
|
|
||||||
|
@ -35,7 +31,9 @@ COPY . projects/lbry
|
||||||
USER root
|
USER root
|
||||||
RUN chown -R $user:$user .
|
RUN chown -R $user:$user .
|
||||||
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
|
RUN python3.7 -m pip install --user -e . && rm ~/.cache -rf
|
||||||
|
|
||||||
# entry point
|
# entry point
|
||||||
|
|
Loading…
Reference in a new issue