Dockerfile для bitdeals-dm
This commit is contained in:
70
docker/Dockerfile
Normal file
70
docker/Dockerfile
Normal file
@@ -0,0 +1,70 @@
|
||||
## BitDeals Module Dockerfile
|
||||
|
||||
## Base image
|
||||
FROM debian:bullseye
|
||||
|
||||
LABEL name="BitDeals Module"
|
||||
EXPOSE 4977/tcp 80/tcp
|
||||
|
||||
## Add the Module user
|
||||
ARG UNAME=module
|
||||
ARG UHOME="/home/$UNAME"
|
||||
RUN useradd --create-home --home-dir $UHOME $UNAME
|
||||
|
||||
## Debian update; install dependencies for: C++ compiler; OpenPGP; Libbitcoin; GPG
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN set -ex ; apt-get update && apt-get upgrade -y ; \
|
||||
apt-get -y install --no-install-recommends build-essential libssl-dev libcurl4-openssl-dev make cmake gcc g++ git ; \
|
||||
apt-get -y install --no-install-recommends libgmp-dev libbz2-dev libzip-dev ; \
|
||||
apt-get -y install --no-install-recommends autoconf automake libtool pkg-config wget ; \
|
||||
apt-get -y install --no-install-recommends gpg gpg-agent
|
||||
|
||||
## Avoid error: "Server Certificate Verification Failed. CRLfile: none"
|
||||
RUN set -ex ; apt-get update ; apt-get install -y --reinstall ca-certificates #; rm -Rf /var/lib/apt/lists/*
|
||||
|
||||
## Install OpenPGP
|
||||
RUN set -ex ; su -l --shell /bin/bash $UNAME -c 'git clone https://github.com/calccrypto/OpenPGP ; \
|
||||
mkdir OpenPGP/build ; cd OpenPGP/build ; \
|
||||
sed -i "s/master/main/" ../contrib/cmake/GoogleTest.txt.in ; \
|
||||
cmake -DUSE_OPENSSL=ON -DGPG_COMPATIBLE=ON .. ; \
|
||||
make' ; \
|
||||
cd $UHOME/OpenPGP/build/ ; \
|
||||
make install ; \
|
||||
rm -Rf $UHOME/OpenPGP
|
||||
|
||||
## Install Yaml-cpp
|
||||
RUN set -ex ; su -l --shell /bin/bash $UNAME -c 'git clone https://github.com/jbeder/yaml-cpp ; \
|
||||
mkdir yaml-cpp/build ; cd yaml-cpp/build ; \
|
||||
cmake .. ; \
|
||||
make' ; \
|
||||
cd $UHOME/yaml-cpp/build/ ; \
|
||||
make install ; \
|
||||
rm -Rf $UHOME/yaml-cpp
|
||||
|
||||
## Install Libbitcoin explorer
|
||||
RUN set -ex ; su -l --shell /bin/bash $UNAME -c 'wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-explorer/version3/install.sh ; \
|
||||
chmod +x install.sh' ; \
|
||||
cd $UHOME ; \
|
||||
sed -i '/git clone / s/git.*$/while true; do & \&\& break; done/' install.sh ; \
|
||||
sed -i '/wget / s/wget.*$/while true; do & \&\& break; done/' install.sh ; \
|
||||
./install.sh --build-boost --build-zmq --disable-shared ; \
|
||||
rm -Rf $UHOME/build-libbitcoin-explorer $UHOME/install.sh
|
||||
|
||||
## Install BitDeals dm
|
||||
RUN set -ex ; su -l --shell /bin/bash $UNAME -c 'cd '$UHOME' ; \
|
||||
git clone https://bitbucket.org/bitdeals/apostol-dm.git ; \
|
||||
cd apostol-dm ; \
|
||||
./configure ; \
|
||||
cd cmake-build-release ; \
|
||||
make' ; \
|
||||
cd $UHOME/apostol-dm/cmake-build-release ;\
|
||||
make install ; \
|
||||
rm -Rf $UHOME/apostol-dm
|
||||
|
||||
## Copy configuration helper script
|
||||
#ADD https://bitbucket.org/bitdeals/apostol-dm/docker/entrypoint.sh /entrypoint.sh
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
RUN set -ex ; chmod 755 /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user