Pushed v1.0.0 of the Docker image
This commit is contained in:
parent
e1c7a916d8
commit
28294dc95d
45
Dockerfile
45
Dockerfile
@ -1,55 +1,16 @@
|
||||
# syntax=docker/dockerfile:1.3-labs
|
||||
# Use a base image
|
||||
FROM cruizba/ubuntu-dind:focal-24.0.6
|
||||
FROM nestybox/ubuntu-focal-systemd-docker
|
||||
|
||||
# Install necessary packages
|
||||
RUN apt update && \
|
||||
apt install -y wget gnupg2 software-properties-common supervisor sudo unzip
|
||||
|
||||
# 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 --security=insecure cd /blockbook && 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
|
||||
apt install -y wget gnupg2 software-properties-common unzip
|
||||
|
||||
# Download deb files
|
||||
RUN wget https://github.com/ranchimall/blockbook-docker/archive/main.zip && unzip main.zip
|
||||
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
|
||||
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
|
||||
|
||||
COPY main-helper.sh /
|
||||
|
||||
# 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", "/main-helper.sh"]
|
||||
CMD ["/lib/systemd/systemd"]
|
||||
55
Dockerfile-prebuilt
Normal file
55
Dockerfile-prebuilt
Normal file
@ -0,0 +1,55 @@
|
||||
# syntax=docker/dockerfile:1.3-labs
|
||||
# Use a base image
|
||||
FROM cruizba/ubuntu-dind:focal-24.0.6
|
||||
|
||||
# Install necessary packages
|
||||
RUN apt update && \
|
||||
apt install -y wget gnupg2 software-properties-common supervisor sudo unzip
|
||||
|
||||
# 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 --security=insecure cd /blockbook && 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-docker/archive/main.zip && unzip main.zip
|
||||
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
|
||||
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
|
||||
|
||||
COPY prebuilt-helper.sh /
|
||||
|
||||
# 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", "/prebuilt-helper.sh"]
|
||||
16
README.md
16
README.md
@ -1,5 +1,15 @@
|
||||
# Blockbook docker
|
||||
|
||||
## Pre-requisites
|
||||
Should have [sysbox installed on your machine](https://github.com/nestybox/sysbox/blob/master/docs/developers-guide/build.md)
|
||||
|
||||
## Main commands
|
||||
```
|
||||
sudo docker run -d --runtime=sysbox-runc -P -p <hostport>:9166 -n blockbook ranchimallfze/blockbook:1.0.0
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
The code and steps required to run Docker version of Blockbook block explorer
|
||||
|
||||
```
|
||||
@ -17,3 +27,9 @@ docker buildx rm insecure-builder
|
||||
|
||||
sudo docker run -v /var/run/docker.sock:/var/run/docker.sock -ti ubuntu:20.04
|
||||
```
|
||||
|
||||
```
|
||||
sudo docker run -d --runtime=sysbox-runc -P -p 9167:9166 5018bee64419
|
||||
|
||||
sudo docker run -d --runtime=sysbox-runc --net=host -P 5018bee64419
|
||||
```
|
||||
@ -1,3 +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
|
||||
sudo systemctl start backend-flo.service
|
||||
|
||||
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
|
||||
sudo systemctl start blockbook-flo.service
|
||||
3
prebuilt-helper.sh
Normal file
3
prebuilt-helper.sh
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user