Workaround by using prebuilt deb files inside a Docker image

This commit is contained in:
Vivek Teega 2023-09-18 23:43:24 +00:00
parent 308a5a92e6
commit d3e794a415
2 changed files with 24 additions and 19 deletions

View File

@ -3,37 +3,37 @@
FROM cruizba/ubuntu-dind:focal-24.0.6 FROM cruizba/ubuntu-dind:focal-24.0.6
# Install necessary packages # Install necessary packages
RUN apt-get update && \ RUN apt update && \
apt-get install -y wget gnupg2 software-properties-common supervisor make git sudo apt install -y wget gnupg2 software-properties-common supervisor sudo unzip
# Mount the Docker socket from the host into the container # Mount the Docker socket from the host into the container
# VOLUME /var/run/docker.sock:/var/run/docker.sock # VOLUME /var/run/docker.sock:/var/run/docker.sock
# Build app (You can add your application build steps here) # # Build app (You can add your application build steps here)
RUN git clone https://github.com/ranchimall/blockbook # RUN git clone https://github.com/ranchimall/blockbook
WORKDIR /blockbook # WORKDIR /blockbook
RUN --security=insecure cd /blockbook && make all-flo # RUN --security=insecure cd /blockbook && make all-flo
# Install deb files # # Install deb files
RUN sudo apt install -y ./build/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb && \ # 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 # sudo apt install -y ./build/blockbook-flo_0.4.0_amd64.deb
# Download deb files # 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 \ RUN wget https://github.com/ranchimall/blockbook-docker/archive/main.zip && unzip main.zip
# https://github.com/ranchimall/blockbook/releases/download/flo-v0.4.0-ubuntu/blockbook-flo_0.4.0_amd64.deb RUN cd blockbook-docker-main && sudo apt install -y ./dind_backend-flo_0.15.1.1-satoshilabs-1_amd64.deb && sudo apt install -y ./dind_blockbook-flo_0.4.0_amd64.deb
# Create run flo directory # Create run flo directory
# RUN mkdir -p /run/flo RUN mkdir -p /run/flo
# # Create a common group (e.g., flo-group) and set permissions # # Create a common group (e.g., flo-group) and set permissions
# RUN groupadd flo-group && \ RUN groupadd flo-group && \
# usermod -aG flo-group flo && \ usermod -aG flo-group flo && \
# usermod -aG flo-group blockbook-flo && \ usermod -aG flo-group blockbook-flo && \
# chown :flo-group /run/flo && \ chown :flo-group /run/flo && \
# chmod 777 /run/flo chmod 777 /run/flo
# Setting up supervisor configurations (Uncomment and add your configuration files) # Setting up supervisor configurations (Uncomment and add your configuration files)
COPY alt-helper.sh / # COPY alt-helper.sh /
# COPY blockbook-flo.conf /etc/supervisor/conf.d/ # COPY blockbook-flo.conf /etc/supervisor/conf.d/
# COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
@ -43,6 +43,8 @@ COPY alt-helper.sh /
# touch /var/log/blockbook-flo-error.log && \ # touch /var/log/blockbook-flo-error.log && \
# touch /var/log/blockbook-flo.log # touch /var/log/blockbook-flo.log
COPY main-helper.sh /
# Expose ports # Expose ports
EXPOSE 22 80 9166 EXPOSE 22 80 9166
@ -50,4 +52,4 @@ EXPOSE 22 80 9166
# CMD ["/usr/bin/supervisord"] # CMD ["/usr/bin/supervisord"]
# Start your applications (Uncomment and replace with your application start commands) # Start your applications (Uncomment and replace with your application start commands)
#CMD ["/usr/bin/bash", "/alt-helper.sh"] CMD ["/usr/bin/bash", "/main-helper.sh"]

3
main-helper.sh Normal file
View File

@ -0,0 +1,3 @@
su -s /bin/bash -c "/opt/coins/nodes/flo/bin/flod -datadir=/opt/coins/data/flo/backend -conf=/opt/coins/nodes/flo/flo.conf -pid=/run/flo/flo.pid" flo
su -s /bin/bash -c "cd /opt/coins/blockbook/flo && /opt/coins/blockbook/flo/bin/blockbook -blockchaincfg=/opt/coins/blockbook/flo/config/blockchaincfg.json -datadir=/opt/coins/data/flo/blockbook/db -sync -internal=:9066 -public=:9166 -certfile=/opt/coins/blockbook/flo/cert/blockbook -explorer= -log_dir=/opt/coins/blockbook/flo/logs -dbcache=1073741824" blockbook-flo