From 2110bb5e168e89371ed5f2b73ee26aa78e8816c2 Mon Sep 17 00:00:00 2001 From: Kumar Sahaj Date: Fri, 29 Sep 2023 11:32:59 +0000 Subject: [PATCH 1/2] dockerfile for testnet --- Dockerfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..068d7d2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,52 @@ +# Use a base image +FROM cruizba/ubuntu-dind:latest + +# Install necessary packages +RUN apt-get update && \ + apt-get install -y wget gnupg2 software-properties-common supervisor make git sudo + +# Mount the Docker socket from the host into the container +# VOLUME /var/run/docker.sock:/var/run/docker.sock + +# Build app (You can add your application build steps here) +RUN git clone https://github.com/ranchimall/blockbook +# WORKDIR /blockbook +# RUN sudo make all-flo + +# Install deb files +# RUN sudo apt install -y ./build/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb && \ +# sudo apt install -y ./build/blockbook-flo_0.4.0_amd64.deb + +# Download deb files +# RUN wget https://github.com/ranchimall/blockbook/releases/download/flo-v0.4.0-ubuntu/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb \ +# https://github.com/ranchimall/blockbook/releases/download/flo-v0.4.0-ubuntu/blockbook-flo_0.4.0_amd64.deb + +# Create run flo directory +# RUN mkdir -p /run/flo + +# # Create a common group (e.g., flo-group) and set permissions +# RUN groupadd flo-group && \ +# usermod -aG flo-group flo && \ +# usermod -aG flo-group blockbook-flo && \ +# chown :flo-group /run/flo && \ +# chmod 777 /run/flo + +# Setting up supervisor configurations (Uncomment and add your configuration files) +COPY alt-helper.sh / +# COPY blockbook-flo.conf /etc/supervisor/conf.d/ +# COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +# Create log files +# RUN touch /var/log/backend-flo-error.log && \ +# touch /var/log/backend-flo.log && \ +# touch /var/log/blockbook-flo-error.log && \ +# touch /var/log/blockbook-flo.log + +# Expose ports +EXPOSE 22 80 9166 + +# Start supervisord (Uncomment this line) +# CMD ["/usr/bin/supervisord"] + +# Start your applications (Uncomment and replace with your application start commands) +CMD ["/usr/bin/bash", "/alt-helper.sh"] \ No newline at end of file From 84574b507a0ead67f21782feadceccb8ac379e65 Mon Sep 17 00:00:00 2001 From: Kumar Sahaj Date: Fri, 29 Sep 2023 11:39:02 +0000 Subject: [PATCH 2/2] new changees --- Testnet_Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Testnet_Dockerfile diff --git a/Testnet_Dockerfile b/Testnet_Dockerfile new file mode 100644 index 0000000..2cadbff --- /dev/null +++ b/Testnet_Dockerfile @@ -0,0 +1,23 @@ +# Use a base image +FROM nestybox/ubuntu-focal-systemd-docker + +# Install necessary packages +RUN apt update && \ + apt install -y wget gnupg2 software-properties-common unzip + +# Download and unzip the source code +RUN wget https://github.com/ranchimall/blockbook-docker/archive/main.zip && \ + unzip main.zip && \ + rm main.zip + +# Change working directory to the unzipped source code directory +WORKDIR /blockbook-docker-main + +# Install the required Debian packages +RUN apt install -y ./deb-files/dind_backend-flo-testnet_0.15.1.1-satoshilabs-1_amd64.deb && \ + apt install -y ./deb-files/dind_blockbook-flo-testnet_0.4.0_amd64.deb +# Expose ports +EXPOSE 22 80 19166 + +# Start your applications (Uncomment and replace with your application start commands) +CMD ["/lib/systemd/systemd"]