From c348055ee58f4ae3b1d84b862ba76e2eedbee709 Mon Sep 17 00:00:00 2001 From: Kumar Sahaj Date: Wed, 6 Sep 2023 18:18:47 +0000 Subject: [PATCH] commit chages to docker file in which we are directly accessing and running the dev files --- Dockerfile | 53 +++++++++++++++++------------------------------------ 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32fc1c7..c7b8fd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,45 +1,26 @@ -# Use a base Ubuntu image +# Use a base image FROM ubuntu:20.04 -# Set environment variables to avoid interaction during installation -ENV DEBIAN_FRONTEND=noninteractive - -# Install required packages +# Install necessary packages RUN apt-get update && \ - apt-get install -y \ - git \ - build-essential \ - cmake \ - libtool \ - autoconf \ - automake \ - pkg-config \ - libssl-dev \ - libsqlite3-dev \ - libboost-all-dev \ - libcurl4-openssl-dev \ - golang \ - npm \ - curl + apt-get install -y wget && \ + apt-get install -y gnupg2 && \ + apt-get install -y software-properties-common -# Clone the blockbook repository -RUN git clone https://github.com/ranchimall/blockbook /opt/blockbook +# Download the pre-built files from GitHub releases +RUN wget https://github.com/ranchimall/blockbook/releases/download/v0.4.0/blockbook-flo_0.4.0_amd64.deb && \ + wget https://github.com/ranchimall/blockbook/releases/download/v0.15.1.1/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb -# Build the blockbook files -WORKDIR /opt/blockbook -RUN make deb-flo +# Install the downloaded packages +RUN apt install -y ./backend-flo_0.15.1.1-satoshilabs-1_amd64.deb && \ + apt install -y ./blockbook-flo_0.4.0_amd64.deb -# Install the backend and blockbook services -RUN apt-get install -y ./blockbook-flo*.deb && \ - apt-get install -y ./backend-flo*.deb +# Clean up downloaded packages +RUN rm -f ./backend-flo_0.15.1.1-satoshilabs-1_amd64.deb && \ + rm -f ./blockbook-flo_0.4.0_amd64.deb -# Start the backend service -RUN systemctl start backend-flo.service - -# Expose the blockbook port +# Expose the port for the Blockbook web interface EXPOSE 9166 -# Start the blockbook service -CMD ["systemctl", "start", "blockbook-flo.service"] - - +# Start the Blockbook service +CMD ["/usr/local/bin/blockbook", "--config", "/etc/blockbook/blockbook-flo.cfg"] \ No newline at end of file