Dockerfile: add ssl

This commit is contained in:
2023-03-17 07:05:41 -01:00
parent f02ec2cad2
commit e2dbd3cc6f
6 changed files with 92 additions and 39 deletions

View File

@@ -1,9 +1,9 @@
# syntax=docker/dockerfile:3
## syntax=docker/dockerfile:3
## BitDeals Module Dockerfile
## the Module user
ARG UNAME="module"
ARG UNAME="dm"
ARG UHOME="/home/$UNAME"
## Base image
@@ -12,15 +12,17 @@ FROM debian:bullseye AS updated-debian
SHELL ["/bin/bash", "-exo", "pipefail", "-c"]
LABEL name="BitDeals Module"
EXPOSE 4999/tcp 80/tcp
EXPOSE 4999/tcp 80/tcp 443/tcp
## Debian update; install dependencies
ARG DEBIAN_FRONTEND=noninteractive
ARG DEBIAN_FRONTEND="noninteractive" \
DEBCONF_NOWARNINGS="yes"
RUN apt-get update -y ; \
apt-get upgrade -y ; \
apt-get -y install --no-install-recommends locales ; \
apt-get -y install --no-install-recommends gpg gpg-agent ; \
apt-get -y install --no-install-recommends nginx ; \
apt-get -y install --no-install-recommends openssl ca-certificates ; \
apt-get clean ; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -36,7 +38,8 @@ RUN useradd --create-home --home-dir $UHOME $UNAME
FROM updated-debian AS development
## Debian update; install dependencies for: C++ compiler; OpenPGP; Libbitcoin
ARG DEBIAN_FRONTEND=noninteractive
ARG DEBIAN_FRONTEND="noninteractive" \
DEBCONF_NOWARNINGS="yes"
RUN apt-get -y update
RUN apt-get -y install --no-install-recommends build-essential libssl-dev libcurl4-openssl-dev make cmake gcc g++ git
RUN apt-get -y install --no-install-recommends libgmp-dev libbz2-dev libzip-dev
@@ -71,9 +74,10 @@ RUN su -l --shell /bin/bash $UNAME -c 'wget https://raw.githubusercontent.com/li
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
./install.sh --verbose --build-boost --build-zmq --disable-shared
## Install BitDeals module (apostol-dm)
#cmake -DCMAKE_BUILD_TYPE=Debug . -B cmake-build-debug' ; \
RUN su -l --shell /bin/bash $UNAME -c 'cd '$UHOME' ; \
git clone https://git.bitdeals.org/private/apostol-dm.git ; \
cd apostol-dm ; \
@@ -97,16 +101,15 @@ FROM updated-debian
ARG UNAME
ARG UHOME
ENV UNAME=$UNAME
ENV LC_ALL=ru_RU.UTF-8
ENV UHOME=$UHOME
COPY --from=development /usr/local/ /usr/local/
COPY --from=development /etc/dm/ /etc/dm/
COPY --from=development /usr/sbin/dm /usr/sbin/dm
COPY --from=development /etc/init.d/dm /etc/init.d/dm
COPY --from=development --chown=www-data:www-data $UHOME/web-build/build /var/www/web
COPY --from=development --chown=$UNAME:$UNAME $UHOME/apostol-dm/docker/bitdeals-test.asc /etc/dm/bitdeals-test.asc
COPY --from=development --chown=$UNAME:$UNAME $UHOME/apostol-dm/docker/bitdeals-test.asc /etc/dm/bitdeals-testnet.asc
#COPY --from=development --chown=$UNAME:$UNAME $UHOME/apostol-dm/docker/bitdeals.asc /etc/dm/bitdeals.asc
COPY --from=development $UHOME/apostol-dm/docker/entrypoint.sh /entrypoint.sh
COPY nginx.conf /etc/nginx/sites-enabled/default