77 lines
3.1 KiB
Docker
77 lines
3.1 KiB
Docker
FROM ubuntu AS ubase-base-aarch64-linux-gnu
|
|
ARG BRANCH
|
|
ENV BRANCH=$BRANCH
|
|
ARG TIMEZONE
|
|
ENV TIMEZONE=$TZ
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
RUN apt-get update && apt-get install -yqq \
|
|
git \
|
|
make \
|
|
file \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
libevent-dev \
|
|
build-essential \
|
|
autotools-dev \
|
|
pkg-config \
|
|
bsdmainutils \
|
|
python3 \
|
|
libevent-dev \
|
|
libboost-all-dev \
|
|
libminiupnpc-dev \
|
|
libzmq3-dev \
|
|
libssl-dev \
|
|
gperf \
|
|
wget \
|
|
# blk commandline utility
|
|
jq \
|
|
bc \
|
|
# cross compile arm
|
|
g++-arm-linux-gnueabihf \
|
|
binutils-arm-linux-gnueabihf \
|
|
# cross compile aarch64
|
|
g++-aarch64-linux-gnu \
|
|
binutils-aarch64-linux-gnu \
|
|
# cross compile macOS
|
|
curl \
|
|
librsvg2-bin \
|
|
libtiff-tools \
|
|
bsdmainutils \
|
|
cmake \
|
|
imagemagick \
|
|
libcap-dev \
|
|
libz-dev \
|
|
libbz2-dev \
|
|
python3-setuptools \
|
|
libtinfo5
|
|
|
|
|
|
FROM ubase-base-aarch64-linux-gnu AS ubase-aarch64-linux-gnu
|
|
|
|
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git
|
|
|
|
|
|
COPY aarch64-linux-gnu ./aarch64-linux-gnu
|
|
WORKDIR /blackcoin-more
|
|
RUN (git clean -xf && \
|
|
./autogen.sh && \
|
|
./configure --prefix=/aarch64-linux-gnu --enable-glibc-back-compat --enable-reduce-exports --disable-tests --disable-bench --disable-gui-tests --enable-upnp-default LDFLAGS=-static-libstdc++ && \
|
|
make -j4 && \
|
|
make install && \
|
|
cd src/ && \
|
|
/usr/bin/aarch64-linux-gnu-strip blackmore*)
|
|
|
|
RUN cp /blackcoin-more/src/blackmored /usr/local/bin/ && \
|
|
cp /blackcoin-more/src/blackmore-cli /usr/local/bin/ && \
|
|
cp /blackcoin-more/contrib/blk /usr/local/bin/
|
|
WORKDIR /aarch64-linux-gnu/parts
|
|
RUN cp --parents /usr/local/bin/blk ./ && \
|
|
cp --parents /usr/local/bin/blackmored ./ && \
|
|
for i in `ldd /usr/local/bin/blackmored | grep -v linux-vdso.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done && \
|
|
cp --parents /usr/local/bin/blackmore-cli ./ && \
|
|
for i in `ldd /usr/local/bin/blackmore-cli | grep -v linux-vdso.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done && \
|
|
cp /usr/bin/bc --parents ./ && \
|
|
cp /usr/bin/jq --parents ./
|
|
WORKDIR /
|
|
RUN ls /blackcoin-more/src | grep blackmore && ls /usr/local/bin && ls /aarch64-linux-gnu/parts/usr |