add Trash*

This commit is contained in:
danielclough
2020-12-27 17:26:03 +01:00
parent ad13bb75d8
commit 414105427b
8 changed files with 2 additions and 294 deletions

View File

@@ -1,53 +0,0 @@
FROM ubuntu AS ubase
ARG BRANCH=master
ENV BRANCH=$BRANCH
ARG TIMEZONE=America/Los_Angeles
ENV TZ=$TIMEZONE
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 AS ubase-base
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git

View File

@@ -1,101 +0,0 @@
FROM ubuntu AS basebase
ENV BRANCH=master
ENV TZ=America/Los_Angeles
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 \
jq \
bc \
g++-aarch64-linux-gnu \
binutils-aarch64-linux-gnu
RUN (wget http://distfiles.gentoo.org/distfiles/db-6.2.38.tar.gz && \
tar -xvf db-6.2.38.tar.gz && \
cd db-6.2.38/build_unix && \
mkdir -p build && \
BDB_PREFIX=$(pwd)/build && \
../dist/configure --disable-shared -disable-replication --enable-cxx --with-pic --prefix=$BDB_PREFIX --with-gui=no --enable-glibc-back-compat --enable-reduce-exports --disable-tests --disable-bench --disable-gui-tests --disable-man && \
make install
# Build Blackcoin More for AMD64
FROM apt-install AS ubase-amd64
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git && \
cd blackcoin-more/ && ./autogen.sh && \
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" --disable-tests --disable-bench --enable-reduce-exports && \
make -j4 && \
cd src/ && \
strip blackmore*)
# Prepare for minimal package
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 /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 ./ && \
for i in `ldd /usr/bin/bc | grep -v linux-vdso.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done && \
cp /usr/bin/jq --parents ./ && \
for i in `ldd /usr/bin/jq | grep -v linux-vdso.so.1 | grep -v libjq.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done
# Build Blackcoin More
FROM apt-install AS ubase-aarch64
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git
RUN (wget http://distfiles.gentoo.org/distfiles/db-6.2.38.tar.gz && \
tar -xvf db-6.2.38.tar.gz && \
cd db-6.2.38/build_unix && \
cd depends && \
make HOST=aarch64-linux-gnu -j4 && \
cd .. && \
./autogen.sh && \
./configure --prefix=$PWD/depends/aarch64-linux-gnu --enable-glibc-back-compat --enable-reduce-exports --disable-tests --disable-bench --disable-gui-tests --enable-upnp-default LDFLAGS=-static-libstdc++ CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" && \
make -j4 && \
make install && \
cd src/ && \
strip blackmore*)
# Prepare for minimal package
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 /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 ./ && \
for i in `ldd /usr/bin/bc | grep -v linux-vdso.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done && \
cp /usr/bin/jq --parents ./ && \
for i in `ldd /usr/bin/jq | grep -v linux-vdso.so.1 | grep -v libjq.so.1 | awk {' if ( $3 == "") print $1; else print $3 '}`; do cp --parents $i ./; done

View File

@@ -1,32 +0,0 @@
FROM blackcoinnl/blackmore-ubase-x86_64:master as build
RUN echo "Building Ubuntu Package"
#
# Collect dependencies
#
FROM ubuntu
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
apt-get -yqq upgrade && \
apt-get -yqq install \
libboost-all-dev \
libzmq3-dev \
libminiupnpc-dev
#
# Copy the binaries from the build to our new container
#
COPY --from=build /blackcoin-more/src/blackmored /usr/local/bin
COPY --from=build /blackcoin-more/src/blackmore-cli /usr/local/bin
COPY --from=build /usr/bin/bc /usr/bin
COPY --from=build /usr/bin/jq /usr/bin
#
# Expose the port for the RPC interface
#
EXPOSE 15714/tcp

View File

@@ -1,10 +0,0 @@
## To Build
#### Log in to [Docker Hub](https://hub.docker.com).
`docker login`
#### Build
`moreBuilder/build.sh`

View File

@@ -1,91 +0,0 @@
#!/bin/bash
BASE_DIR=$(dirname $(realpath $0 ))
moreBuilder=${BASE_DIR}/moreBuilder
SYSTYPE=`lscpu | head -1 | tr -s ' ' | cut -d ' ' -f2`
# DockerHub Account
defaultDockerHub=blackcoinnl
read -p "What is your DockerHub Account Name? (default $defaultDockerHub): " DockerHub
DockerHub=${DockerHub:-${defaultDockerHub}}
if [ $DockerHub != $defaultDockerHub ]; then
sed -i "s/defaultDockerHub=blackcoinnl/defaultDockerHub=$DockerHub/" $0
fi
# Git Account
defaultHubLab=github
read -p "Github or Gitlab? (default $defaultHubLab): " HubLab
HubLab=${HubLab:-${defaultHubLab}}
if [ $HubLab != $defaultHubLab ]; then
sed -i "s|defaultHubLab=github|defaultGit=$HubLab|" $0
sed -i "s|github|$HubLab|" ${BASE_DIR}/Dockerfile.ubase
fi
defaultGit=CoinBlack
read -p "What is your Git account? (default $defaultGit): " Git
Git=${Git:-${defaultGit}}
if [ $Git != $defaultGit ]; then
sed -i "s|defaultGit=CoinBlack|defaultGit=$Git|" $0
sed -i "s|CoinBlack|$Git|" ${BASE_DIR}/Dockerfile.ubase
fi
# Git Branch
read -p "What branch/version? (default $defaultBranch): " BRANCH
defaultBranch=master
BRANCH=${BRANCH:-${defaultBranch}}
if [ $BRANCH != $defaultBranch ]; then
sed -i "s|defaultBranch=master|defaultBranch=$BRANCH|" $0
sed -i "s|ENV BRANCH=v2.13.2.7|ENV BRANCH=$BRANCH|" ${BASE_DIR}/Dockerfile.ubase
fi
# change branch for multi-stage build
defaultUbase=blackcoinnl/blackmore-ubase-x86_64:master
ubase="${DockerHub}/blackmore-ubase-$SYSTYPE:$BRANCH"
if [ $defaultUbase != $ubase ]; then
sed -i "s|FROM $defaultUbase as build|FROM $ubase as build|" ${BASE_DIR}/Dockerfile.ubuntu
sed -i "s|defaultUbase=blackcoinnl/blackmore-ubase-x86_64:master|defaultUbase=$ubase|" $0
fi
# timezone
defaultTimezone=America/Los_Angeles
read -p "What is your timezone? (default $defaultTimezone): " timezone
timezone=${timezone:-${defaultTimezone}}
if [ $timezone != $defaultTimezone ]; then
sed -i "s|defaultTimezone=America/Los_Angeles|defaultTimezone=$timezone|" $0
sed -i "s|defaultTimezone=America/Los_Angeles|$timezone|" ${BASE_DIR}/Dockerfile.ubase
sed -i "s|defaultTimezone=America/Los_Angeles|$timezone|" ${BASE_DIR}/Dockerfile.ubuntu
fi
echo "DockerHub Account: ${DockerHub}"
echo "Git Account: $Git"
echo $BRANCH
echo $SYSTYPE
echo $timezone
minimal="${DockerHub}/blackcoin-more-minimal-$SYSTYPE:$BRANCH"
ubuntu="${DockerHub}/blackcoin-more-ubuntu-$SYSTYPE:$BRANCH"
ubase="${DockerHub}/blackmore-ubase-$SYSTYPE:$BRANCH"
# build
docker build -t $ubase - --network=host < ${BASE_DIR}/Dockerfile.ubase
docker run -itd --network=host --name ubase $ubase bash
docker cp ubase:/parts $moreBuilder
cd $moreBuilder
tar -C parts -c . | docker import - $minimal
docker container rm -f ubase
# push to docker hub
docker image push $minimal
docker image push $ubuntu

View File

@@ -1,3 +0,0 @@
[Trash Info]
Path=contrib/docker/Dockerfile.ubase-base
DeletionDate=2020-12-27T08:13:05

View File

@@ -1,3 +0,0 @@
[Trash Info]
Path=contrib/docker/moreBuilder
DeletionDate=2020-12-26T06:00:23

3
.gitignore vendored
View File

@@ -141,4 +141,5 @@ contrib/devtools/split-debug.sh
osx_volname
dist/
*.background.tiff
*.background.tiff
.Trash*