diff --git a/Dockerfile b/Dockerfile index bfef303..32fc1c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,45 @@ -FROM ubuntu:latest -WORKDIR /app -COPY . /app -RUN apt-get update && apt-get install -y \ - git \ - python3 \ - python3-pip -RUN git clone https://github.com/trezor/blockbook.git -WORKDIR /app/blockbook +# Use a base Ubuntu image +FROM ubuntu:20.04 + +# Set environment variables to avoid interaction during installation +ENV DEBIAN_FRONTEND=noninteractive + +# Install required 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 + +# Clone the blockbook repository +RUN git clone https://github.com/ranchimall/blockbook /opt/blockbook + +# Build the blockbook files +WORKDIR /opt/blockbook +RUN make deb-flo + +# Install the backend and blockbook services +RUN apt-get install -y ./blockbook-flo*.deb && \ + apt-get install -y ./backend-flo*.deb + +# Start the backend service +RUN systemctl start backend-flo.service + +# Expose the blockbook port +EXPOSE 9166 + +# Start the blockbook service +CMD ["systemctl", "start", "blockbook-flo.service"] +