Adding what I had in the lbryio/lbry PR
This commit is contained in:
parent
846bc84f19
commit
868c00b4cb
6 changed files with 155 additions and 0 deletions
55
lbrynet/linux-armhf-compiler/Dockerfile
Normal file
55
lbrynet/linux-armhf-compiler/Dockerfile
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
FROM multiarch/ubuntu-core:armhf-bionic
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y \
|
||||||
|
python3-pip \
|
||||||
|
python3.7 \
|
||||||
|
python3.7-dev \
|
||||||
|
build-essential \
|
||||||
|
libssl-dev \
|
||||||
|
libacl1-dev \
|
||||||
|
liblz4-dev \
|
||||||
|
libfuse-dev \
|
||||||
|
fuse \
|
||||||
|
pkg-config \
|
||||||
|
fakeroot \
|
||||||
|
git \
|
||||||
|
zlib1g-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libncurses5-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
zip \
|
||||||
|
libffi-dev
|
||||||
|
|
||||||
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1 && \
|
||||||
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 10 && \
|
||||||
|
update-alternatives --config python && \
|
||||||
|
python --version && \
|
||||||
|
pip3 --version
|
||||||
|
|
||||||
|
|
||||||
|
RUN python3.7 -m pip install -U pyinstaller cryptography aiohttp coincurve pbkdf2 cryptography attrs pylru
|
||||||
|
|
||||||
|
## SPLIT CONTAINER HERE.
|
||||||
|
RUN git clone https://github.com/lbryio/lbry.git --depth 1 /lbry && \
|
||||||
|
cd /lbry && \
|
||||||
|
git clone https://github.com/lbryio/torba.git --depth 1 /lbry/torba
|
||||||
|
|
||||||
|
RUN sed -i -e "s/'plyvel',//" /lbry/torba/setup.py && \
|
||||||
|
cd /lbry/torba && python3.7 -m pip install -e . && cd /lbry/ && \
|
||||||
|
python3.7 scripts/set_build.py && \
|
||||||
|
python3.7 -m pip install -e . && \
|
||||||
|
pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
||||||
|
|
||||||
|
RUN echo "checking contents of /lbry/dist/" && ls -lAh /lbry/dist/ && \
|
||||||
|
echo "checking contents of /" && ls -lAh / && \
|
||||||
|
echo "redundantly setting executable bit for good measure" && chmod +x /lbry/dist/lbrynet && \
|
||||||
|
echo "compressing lbrynet armhf binary" && zip -j /lbry/dist/lbrynet-armhf.zip /lbry/dist/lbrynet && \
|
||||||
|
echo "creating /target/" && mkdir /target
|
||||||
|
COPY ./start.sh /usr/local/bin/start
|
||||||
|
|
||||||
|
RUN /lbry/dist/lbrynet --version
|
||||||
|
|
||||||
|
CMD start
|
28
lbrynet/linux-armhf-compiler/README.md
Normal file
28
lbrynet/linux-armhf-compiler/README.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# armhf-compiler
|
||||||
|
|
||||||
|
This container's goal is to make CI/CD easier for everyone, Travis CI, GitlabCI, Jenkins... Your desktop's docker equipped development environment.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
#### binfmt_misc register
|
||||||
|
This step sets up your docker daemon to support more container architectures.
|
||||||
|
|
||||||
|
Register `quemu-*-static` for all supported processors except the current one.
|
||||||
|
* `docker run --rm --privileged multiarch/qemu-user-static:register`
|
||||||
|
|
||||||
|
#### build the armhf bin
|
||||||
|
<!-- TODO: Process could be greatly sped up but keeping it simple for first release. -->
|
||||||
|
* `docker build --tag lbryio/lbrynet:armhf-compiler .`
|
||||||
|
|
||||||
|
#### export compiled bin to local /target
|
||||||
|
This containers sole purpose is to build and spit out the bin.
|
||||||
|
<!-- TODO: Fork this container base to begin work on LbryTV compiler to reduce build time on rpi -->
|
||||||
|
* `docker run --rm -ti -v $(pwd)/target:/target lbryio/lbrynet:armhf-compiler`
|
||||||
|
|
||||||
|
|
||||||
|
## Cleanup
|
||||||
|
If you're doing this on a machine you care to have restored to defaults this is the only host change we imposed so to revert the change you must execute the following docker command.
|
||||||
|
|
||||||
|
Same as above, but remove all registered `binfmt_misc` before
|
||||||
|
* `docker run --rm --privileged multiarch/qemu-user-static:register --reset`
|
||||||
|
|
3
lbrynet/linux-armhf-compiler/start.sh
Executable file
3
lbrynet/linux-armhf-compiler/start.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sleep 2
|
||||||
|
cp /lbry/dist/lbrynet-armhf.zip /target/
|
54
lbrynet/linux-x86_64-compiler/Dockerfile
Normal file
54
lbrynet/linux-x86_64-compiler/Dockerfile
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y \
|
||||||
|
python3-pip \
|
||||||
|
python3.7 \
|
||||||
|
python3.7-dev \
|
||||||
|
build-essential \
|
||||||
|
libssl-dev \
|
||||||
|
libacl1-dev \
|
||||||
|
liblz4-dev \
|
||||||
|
libfuse-dev \
|
||||||
|
fuse \
|
||||||
|
pkg-config \
|
||||||
|
fakeroot \
|
||||||
|
git \
|
||||||
|
zlib1g-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libncurses5-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
zip \
|
||||||
|
libffi-dev
|
||||||
|
|
||||||
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1 && \
|
||||||
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 10 && \
|
||||||
|
update-alternatives --config python && \
|
||||||
|
python --version && \
|
||||||
|
pip3 --version
|
||||||
|
|
||||||
|
|
||||||
|
RUN python3.7 -m pip install -U pyinstaller cryptography aiohttp coincurve pbkdf2 cryptography attrs pylru
|
||||||
|
|
||||||
|
## Split container here.
|
||||||
|
RUN git clone https://github.com/lbryio/lbry.git --depth 1 /lbry && \
|
||||||
|
cd /lbry && \
|
||||||
|
git clone https://github.com/lbryio/torba.git --depth 1 /lbry/torba
|
||||||
|
|
||||||
|
RUN cd /lbry/torba && python3.7 -m pip install -e . && cd /lbry/ && \
|
||||||
|
python3.7 scripts/set_build.py && \
|
||||||
|
python3.7 -m pip install -e . && \
|
||||||
|
pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
||||||
|
|
||||||
|
RUN echo "checking contents of /lbry/dist/" && ls -lAh /lbry/dist/ && \
|
||||||
|
echo "checking contents of /" && ls -lAh / && \
|
||||||
|
echo "redundantly setting executable bit for good measure" && chmod +x /lbry/dist/lbrynet && \
|
||||||
|
echo "compressing lbrynet x86_64 binary" && zip -j /lbry/dist/lbrynet-x86_64.zip /lbry/dist/lbrynet && \
|
||||||
|
echo "creating /target/" && mkdir /target
|
||||||
|
COPY ./start.sh /usr/local/bin/start
|
||||||
|
|
||||||
|
RUN /lbry/dist/lbrynet --version
|
||||||
|
|
||||||
|
CMD start
|
12
lbrynet/linux-x86_64-compiler/README.md
Normal file
12
lbrynet/linux-x86_64-compiler/README.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# x86_64-compiler
|
||||||
|
|
||||||
|
This container's goal is to make CI/CD easier for everyone, Travis CI, GitlabCI, Jenkins... Your desktop's docker equipped development environment.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
#### build the x86_64 bin
|
||||||
|
* `docker build --tag lbryio/lbrynet:x86_64-compiler .`
|
||||||
|
|
||||||
|
#### export compiled bin to local /target
|
||||||
|
This containers sole purpose is to build and spit out the x86_64 binary.
|
||||||
|
* `docker run --rm -ti -v $(pwd)/target:/target lbryio/lbrynet:x86_64-compiler`
|
3
lbrynet/linux-x86_64-compiler/start.sh
Executable file
3
lbrynet/linux-x86_64-compiler/start.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sleep 2
|
||||||
|
cp /lbry/dist/lbrynet-x86_64.zip /target/
|
Loading…
Reference in a new issue