37 Commits

Author SHA1 Message Date
danielclough
4dcc62a321 only build when src/* changes 2020-12-30 08:20:38 +01:00
danielclough
414105427b add Trash* 2020-12-27 17:26:03 +01:00
danielclough
ad13bb75d8 reorganize folders 2020-12-27 17:20:23 +01:00
danielclough
4bb08626b7 add platform support 2020-12-26 20:04:11 +01:00
danielclough
e644953647 make TIMEZONE env 2020-12-26 18:31:02 +01:00
danielclough
fcf76f934b make BRANCH an environment variable 2020-12-26 17:49:12 +01:00
danielclough
a97f82b3f9 fix context 2020-12-26 17:38:26 +01:00
danielclough
6cbd66206f branches other than master don't tag as latest 2020-12-26 17:30:42 +01:00
danielclough
c95700413a fix cp path 2020-12-26 17:12:26 +01:00
danielclough
1675e5ae47 fix BASE_DIR 2020-12-26 17:06:52 +01:00
danielclough
00f7f83ac8 test PWD 2020-12-26 17:01:41 +01:00
danielclough
b2ea24e4f3 fix typo 2020-12-26 16:59:15 +01:00
danielclough
917f2e28aa Jenkins BASE_DIR fix 2020-12-26 16:58:06 +01:00
danielclough
36fadd90a7 fix typo 2020-12-26 16:52:08 +01:00
danielclough
a6b73dda8c pass $WORKSPACE as $BASE_DIR 2020-12-26 16:50:55 +01:00
danielclough
c7642e1f18 if PWD change BASE_PATH 2020-12-26 16:38:03 +01:00
danielclough
b13663fad7 fix typo 2020-12-26 16:30:53 +01:00
danielclough
0d0ae1229f basepath for Jenkins 2020-12-26 16:27:54 +01:00
danielclough
0d6cc04d35 remove absolute path from minimal build 2020-12-26 16:16:16 +01:00
danielclough
7aba573321 try apt-get wget 2020-12-26 15:59:00 +01:00
danielclough
e780e7afd1 absolute path for wget 2020-12-26 15:52:05 +01:00
danielclough
f83cf7979a fix typo 2020-12-26 15:46:47 +01:00
danielclough
ac0c3be923 fix env and install script 2020-12-26 15:45:01 +01:00
danielclough
91b6717f0a add multi-arch support and build from shell script 2020-12-26 15:10:58 +01:00
danielclough
f916662d90 fix typo 2020-12-24 13:20:16 +01:00
danielclough
648ef4ee66 add net=host 2020-12-24 13:15:07 +01:00
danielclough
1f1aa556e1 move back 2020-12-09 13:48:35 -08:00
danielclough
fc380599f2 move Jenkinsfile to contrib 2020-12-09 13:38:14 -08:00
danielclough
1a00a68fbe change build test command 2020-12-09 12:05:03 -08:00
danielclough
687fa65b05 Merge branch 'add-jenkins' of github.com:CoinBlack/blackcoin-more into add-jenkins 2020-12-09 11:13:55 -08:00
Daniel Clough
e18cfb58a1 test Jenkins with Blue Ocean 2020-12-09 11:07:27 -08:00
danielclough
0390f1b8e6 exit 2020-12-09 10:14:10 -08:00
danielclough
0e6275c72f Merge branch 'master' of gitlab.com:DanielClough/blackcoin-more 2020-12-08 18:39:11 -08:00
danielclough
05b9e57000 add blackmored.service 2020-11-24 01:51:54 -08:00
danielclough
2bc89d5ad2 add blackmored.service 2020-11-24 00:35:05 -08:00
danielclough
404c175fa2 add blackmored.service 2020-11-24 00:27:27 -08:00
danielclough
5fbf64be58 add MALLOC_ARENA_MAX=1 and other small adjustments 2020-11-24 00:00:05 -08:00
13 changed files with 538 additions and 23 deletions

3
.gitignore vendored
View File

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

11
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,11 @@
pipeline {
agent { label 'master' }
stages {
stage('build') {
when { changeset pattern: "src/*", caseSensitive: true }
steps {
sh "contrib/docker/build.sh -o x86_64-linux-gnu blackcoinnl github CoinBlack" + env.GIT_LOCAL_BRANCH + " Etc/UTC"
}
}
}
}

7
contrib/docker/.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
aarch64-linux-gnu/aarch64-linux-gnu/*
aarch64-linux-gnu/parts/*
arm-linux-gnueabihf/arm-linux-gnueabihf/*
arm-linux-gnueabihf/parts/*
x86_64-linux-gnu/x86_64-linux-gnu/*
x86_64-linux-gnu/parts/*
depends*.*xz

10
contrib/docker/README.md Executable file
View File

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

View File

@@ -0,0 +1,77 @@
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

View File

@@ -0,0 +1,22 @@
FROM ubase-aarch64-linux-gnu AS ubuntu-aarch64-linux-gnu
# 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 to our new container
COPY --from=ubase-aarch64-linux-gnu /blackcoin-more/src/blackmored /usr/local/bin
COPY --from=ubase-aarch64-linux-gnu /blackcoin-more/src/blackmore-cli /usr/local/bin
COPY --from=ubase-aarch64-linux-gnu /usr/bin/bc /usr/bin
COPY --from=ubase-aarch64-linux-gnu /usr/bin/jq /usr/bin
# Expose the port for the RPC interface
EXPOSE 15714/tcp

View File

@@ -0,0 +1,74 @@
FROM ubuntu AS ubase-base-arm-linux-gnueabihf
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-arm-linux-gnueabihf AS ubase-arm-linux-gnueabihf
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git
COPY arm-linux-gnueabihf ./arm-linux-gnueabihf
WORKDIR /blackcoin-more
RUN (git clean -xf && \
./autogen.sh && \
./configure --prefix=/arm-linux-gnueabihf --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/arm-linux-gnueabihf-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 /arm-linux-gnueabihf/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 /

View File

@@ -0,0 +1,22 @@
FROM ubase-arm-linux-gnueabihf AS ubuntu-arm-linux-gnueabihf
# 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 to our new container
COPY --from=ubase-arm-linux-gnueabihf /blackcoin-more/src/blackmored /usr/local/bin
COPY --from=ubase-arm-linux-gnueabihf /blackcoin-more/src/blackmore-cli /usr/local/bin
COPY --from=ubase-arm-linux-gnueabihf /usr/bin/bc /usr/bin
COPY --from=ubase-arm-linux-gnueabihf /usr/bin/jq /usr/bin
# Expose the port for the RPC interface
EXPOSE 15714/tcp

185
contrib/docker/build.sh Executable file
View File

@@ -0,0 +1,185 @@
#!/bin/bash
[[ -z `echo $PWD | grep jenkins_home` ]] && BASE_DIR=$(dirname $(realpath $0 )) || BASE_DIR="${WORKSPACE}/contrib/docker"
Alist="\n
\t \t \t \t aarch64-linux-gnu \t (eg. Raspi4 with Ubuntu) \n
\t \t \t \t arm-linux-gnueabihf \t (eg. Other Raspi) \n
\t \t \t \t x86_64-linux-gnu \t (aka. Linux AMD64) \n
\t \t \t \t all \t (only works in option mode) \n
"
usage="Usage: \n
\t option mode: \t \`build.sh -o <architecture> <DockerHub> <HubLab> <GitAccount> <BRANCH> <TIMEZONE>\` \n
\t interactive: \t \`build.sh -i\` \n
\t \t \t help: \t \`build.sh -h\` \n
\n Architectures: ${Alist} \n
"
h1="<architecture> \t Choose your architecture. ${Alist}"
h2="<DockerHub> \t \t Enter your Docker Hub Account name."
h3="<HubLab> \t \t \t Enter \"github\" or \"gitlab\"."
h4="<GitAccount> \t Enter the git account name. (eg. \"CoinBlack\" on GitHub, or \"blackcoin\" on GitLab)"
h5="<BRANCH> \t \t \t Enter the BRANCH name. (eg. master)"
h6="<TIMEZONE> \t \t Enter your timezone. (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)"
help=" \n
\t The defaults in interactive mode, written in for option mode: \n
build.sh -o x86_64-linux-gnu blackcoinnl github CoinBlack v2.13.2.7 America/Los_Angeles \n
\n $h1 \n
\n $h2 \n
\n $h3 \n
\n $h4 \n
\n $h5 \n
\n $h6 \n
"
case $1 in
-h)
echo -e ${help}
;;
-i|-o)
# Questions for Interactive Mode
defaultARCH=${2:-x86_64-linux-gnu}
defaultDockerHub=${3:-blackcoinnl}
defaultHubLab=${4:-github}
defaultRepo=${5:-CoinBlack}
defaultBranch=${6:-v2.13.2.7}
defaultTimezone=${7:-America/Los_Angeles}
if [[ $1 == -i ]]; then
echo -e ${Alist}
read -p "For what architecture would you like to build? ($defaultARCH): " architecture
read -p "What is your DockerHub Account Name? ($defaultDockerHub): " DockerHub
read -p "Github or Gitlab? ($defaultHubLab): " HubLab
read -p "What is your GitAccount name? ($defaultRepo): " GitAccount
read -p "What BRANCH/version? ($defaultBranch): " BRANCH
read -p "What is your TIMEZONE? (${defaultTimezone}): " TIMEZONE
echo "Architecture: ${architecture}"
echo "DockerHub Account: ${DockerHub}"
echo "Git Account: ${HubLab}.com/${GitAccount} ${BRANCH}"
echo "Timezone: ${TIMEZONE}"
else
echo -e "
Option Mode! \n
Architecture: $2
DockerHub Account: $3
Git Account: https://${4}.com/${5} ${6}
Timezone: ${7}
"
fi
# Architecture
architecture=${architecture:-${defaultARCH}}
if [[ ${architecture} == all ]]; then
bash ${BASE_DIR}/build.sh -o aarch64-linux-gnu $3 $4 $5 $6 $7
bash ${BASE_DIR}/build.sh -o arm-linux-gnueabihf $3 $4 $5 $6 $7
bash ${BASE_DIR}/build.sh -o x86_64-linux-gnu $3 $4 $5 $6 $7
exit 0
else
[[ ${architecture} != ${defaultARCH} ]] && sed -i "s/-x86_64-linux-gnu/-${architecture}/" $0
# Download Dependencies
if [[ -f ${BASE_DIR}/depends-${architecture}.tar.xz && -f ${BASE_DIR}/${architecture}/${architecture}/bin/fc-cache ]]; then
echo "Dependencies exist! Checking sha256sum!";
case $architecture in
aarch64-linux-gnu)
checkSUM=`echo "f6f1b099d876db90396d0d56eb5b3f366f14c90e077524e2b10bfdaaa1aa5805 ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK!" || exit 1
;;
arm-linux-gnueabihf)
checkSUM=`echo "339c1159adcccecb45155b316f1f5772009b92acb8cfed29464dd7f09775fb79 ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK!" || exit 1
;;
x86_64-linux-gnu)
checkSUM=`echo "eed063b26f4c4e0fa35dc085fe09bafd4251cffa76cdabb26bf43077da03b84e ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK!" || exit 1
;;
esac
else
[[ -z `which wget` ]] && apt-get install wget
/usr/bin/wget -qO ${BASE_DIR}/depends-${architecture}.tar.xz https://admin.blackcoin.nl/static/depends-${architecture}.tar.xz
case $architecture in
aarch64-linux-gnu)
platform="linux/arm64, linux/arm/v8"
checkSUM=`echo "f6f1b099d876db90396d0d56eb5b3f366f14c90e077524e2b10bfdaaa1aa5805 ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK! You will need sudo to untar the dependencies." && sudo tar xJf ${BASE_DIR}/depends-${architecture}.tar.xz -C ${BASE_DIR}/\
|| exit 1
;;
arm-linux-gnueabihf)
platform="linux/arm/v7"
checkSUM=`echo "339c1159adcccecb45155b316f1f5772009b92acb8cfed29464dd7f09775fb79 ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK! You will need sudo to untar the dependencies." && sudo tar xJf ${BASE_DIR}/depends-${architecture}.tar.xz -C ${BASE_DIR}/\
|| exit 1
;;
x86_64-linux-gnu)
platform="linux/amd64"
checkSUM=`echo "eed063b26f4c4e0fa35dc085fe09bafd4251cffa76cdabb26bf43077da03b84e ${BASE_DIR}/depends-${architecture}.tar.xz" | sha256sum --check | awk '{print $2}' 2> /dev/null`
[[ "${checkSUM}" == "OK" ]] && echo "The sha256sum is OK! You will need sudo to untar the dependencies." && sudo tar xJf ${BASE_DIR}/depends-${architecture}.tar.xz -C ${BASE_DIR}/\
|| exit 1
;;
esac
echo -e "
Dependencies SHA256SUM GOOD!
"
fi
# DockerHub Account
DockerHub=${DockerHub:-${defaultDockerHub}}
[[ $DockerHub != ${defaultDockerHub} ]] && sed -i "s/blackcoinnl/${DockerHub}/" $0
# Git Account
HubLab=${HubLab:-${defaultHubLab}}
[[ $HubLab != $defaultHubLab ]] && sed -i "s|github|${HubLab}|" $0
GitAccount=${GitAccount:-${defaultRepo}}
[[ ${GitAccount} != ${defaultRepo} ]] && sed -i "s|CoinBlack|$GitAccount|" $0
# BRANCH
BRANCH=${BRANCH:-${defaultBranch}}
[[ ${BRANCH} != ${defaultBranch} ]] && sed -i "s|v2.13.2.7|${BRANCH}|" $0
# TIMEZONE
TIMEZONE=${TIMEZONE:-${defaultTimezone}}
[[ ${TIMEZONE} != ${defaultTimezone} ]] && sed -i "s|America/Los_Angeles|${TIMEZONE}|" $0
# build ubase
ubase="ubase-${architecture}"
Dockerfile="${BASE_DIR}/${architecture}/Dockerfile.${ubase}"
docker build --network=host ${BASE_DIR}/${architecture} -t ${ubase} --build-arg BRANCH=${BRANCH} --build-arg TIMEZONE=${TZ} -f ${Dockerfile}
# build ubuntu
ubuntu="ubuntu-${architecture}"
Dockerfile="${BASE_DIR}/${architecture}/Dockerfile.${ubuntu}"
docker build --network=host -t ${ubuntu}:${BRANCH} - < ${Dockerfile}
[[ ${BRANCH} != master ]] || docker image tag ${ubuntu}:${BRANCH} ${DockerHub}/blackcoin-more-ubuntu-${architecture}:latest && \
docker image tag ${ubuntu}:${BRANCH} ${DockerHub}/blackcoin-more-ubuntu-${architecture}:${BRANCH}
# build minimal
minimal="minimal-${architecture}"
rm -fr ${BASE_DIR}/${architecture}/parts
docker run -itd --network=host --name ${ubase} ${ubase} bash
docker cp ${ubase}:/${architecture}/parts ${BASE_DIR}/${architecture}/parts
cd ${BASE_DIR}/${architecture}
tar -C parts -c . | docker import - ${minimal}:${BRANCH}
docker container rm -f ${ubase}
[[ ${BRANCH} != master ]] || docker image tag ${minimal}:${BRANCH} ${DockerHub}/blackcoin-more-minimal-${architecture}:latest && \
docker image tag ${minimal}:${BRANCH} ${DockerHub}/blackcoin-more-minimal-${architecture}:${BRANCH}
fi
;;
*)
echo -e ${usage}
;;
esac

View File

@@ -0,0 +1,74 @@
FROM ubuntu AS ubase-base-x86_64-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-x86_64-linux-gnu AS ubase-x86_64-linux-gnu
RUN git clone -b $BRANCH https://github.com/CoinBlack/blackcoin-more.git
COPY x86_64-linux-gnu ./x86_64-linux-gnu
WORKDIR /blackcoin-more
RUN (git clean -xf && \
./autogen.sh && \
./configure --prefix=/x86_64-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/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 /x86_64-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 /

View File

@@ -0,0 +1,23 @@
FROM ubase-x86_64-linux-gnu AS ubuntu-x86_64-linux-gnu
# 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 to our new container
COPY --from=ubase-x86_64-linux-gnu /blackcoin-more/src/blackmored /usr/local/bin
COPY --from=ubase-x86_64-linux-gnu /blackcoin-more/src/blackmore-cli /usr/local/bin
COPY --from=ubase-x86_64-linux-gnu /usr/bin/bc /usr/bin
COPY --from=ubase-x86_64-linux-gnu /usr/bin/jq /usr/bin
# Expose the port for the RPC interface
EXPOSE 15714/tcp

View File

@@ -1,22 +0,0 @@
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \
-conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,31 @@
[Unit]
Description=Blackmore daemon
After=network.target
[Service]
ExecStart=export MALLOC_ARENA_MAX=1 && /usr/local/bin/blackmored -daemon -conf=/var/lib/.blackmore/blackmore.conf -datadir=/var/lib/.blackmore
>>>>>>> 5fbf64be585767e86ad48dbd1dfb02141a8f23ab
ExecStop=/usr/local/bin/blackmored stop
User=blackmore
Group=blackmore
Restart=on-failure
# Because it's a daemon process
Type=forking
PIDFile=/var/lib/.bitmored/blackmored.pid
ProtectHome=true
ProtectSystem=full
PrivateTmp=true
PrivateDevices=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target