Clarify: Docker build and run commands
This commit is contained in:
parent
34223a550a
commit
d2813c3b6f
38
README.md
38
README.md
@ -11,37 +11,39 @@ This guide will help you build and run the Docker image for Blockbook Mainnet an
|
|||||||
|
|
||||||
# Mainnet
|
# Mainnet
|
||||||
|
|
||||||
Steps to build the Docker image for mainnet.
|
Steps to build the Docker image for Mainnet.
|
||||||
|
|
||||||
- **Building the Docker Image**
|
- **Building the Docker Image**
|
||||||
|
|
||||||
Navigate to the directory where the repository is cloned or downloaded and build the Docker image:
|
Navigate to the directory where the repository is cloned and build the Docker image:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd <path/to/cloned/repository>
|
git clone https://github.com/ranchimall/blockbook-docker
|
||||||
docker build -t asif158/mainnet:1.0.0 .
|
cd blockbook-docker
|
||||||
|
docker build -f Dockerfile -t ranchimall/blockbook-mainnet:1.0.0 .
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Running the Docker Container**
|
- **Running the Docker Container**
|
||||||
|
|
||||||
Create a named volume for persistent storage using:
|
Create a named volume for persistent storage:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker volume create mainnet
|
docker volume create mainnet
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the Docker container in detached mode and for mainnet map port `9166` on your host to port `9166` on the container:
|
Run the Docker container in detached mode and map port `9166` of the container to port `9166` (or any other port) on the host machine (`-p host-port:container-port`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -d --name blockbook-mainnet -p 9166:9166 --mount source=mainnet,target=/opt/coins asif158/mainnet:1.0.0
|
docker run -d --name blockbook-mainnet -p 9166:9166 --mount source=mainnet,target=/opt/coins ranchimall/blockbook-mainnet:1.0.0
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Accessing the Frontend**
|
- **Accessing the Frontend**
|
||||||
|
|
||||||
Once the Docker container is running, you can access the frontend of the application by navigating to:
|
Once the Docker container is running, you can access the frontend of the application by navigating to:
|
||||||
|
|
||||||
`https://localhost:9166`
|
```sh
|
||||||
|
https://localhost:9166
|
||||||
|
```
|
||||||
|
|
||||||
in your web browser.
|
in your web browser.
|
||||||
|
|
||||||
@ -74,29 +76,31 @@ Steps to build the Docker image for Testnet.
|
|||||||
Navigate to the directory where the repository is cloned or downloaded and build the Docker image:
|
Navigate to the directory where the repository is cloned or downloaded and build the Docker image:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd <path/to/cloned/repository>
|
cd blockbook-docker
|
||||||
docker build -f Dockerfile-testnet -t asif158/testnet:1.0.0 .
|
docker build -f Dockerfile-testnet -t ranchimall/blockbook-testnet:1.0.0 .
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Running the Docker Container**
|
- **Running the Docker Container**
|
||||||
|
|
||||||
Create a named volume for persistent storage using:
|
Create a named volume for persistent storage:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker volume create testnet
|
docker volume create testnet
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the Docker container in detached mode and for Testnet map port `19166` on your host to port `19166` on the container:
|
Run the Docker container in detached mode and map port `19166` of the container to port `19166` (or any other port) on the host machine (`-p host-port:container-port`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -d --name blockbook-testnet -p 19166:19166 --mount source=testnet,target=/opt/coins asif158/testnet:1.0.0
|
docker run -d --name blockbook-testnet -p 19166:19166 --mount source=testnet,target=/opt/coins ranchimall/blockbook-testnet:1.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Accessing the Frontend**
|
- **Accessing the Frontend**
|
||||||
|
|
||||||
Once the Docker container is running, you can access the frontend of the application by navigating to:
|
Once the Docker container is running, you can access the frontend of the application by navigating to:
|
||||||
|
|
||||||
`https://localhost:19166`
|
```sh
|
||||||
|
https://localhost:19166
|
||||||
|
```
|
||||||
|
|
||||||
in your web browser.
|
in your web browser.
|
||||||
|
|
||||||
@ -144,7 +148,7 @@ Steps to build the Docker image for Testnet.
|
|||||||
docker rmi <imagename>
|
docker rmi <imagename>
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace `<path/to/cloned/repository>`, `<imagename>`, and `<containername>` with the actual path, image name, and container name or ID, respectively.
|
Replace `<imagename>` and `<containername>` with the actual image name and container name or ID, respectively.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@ -154,3 +158,5 @@ Replace `<path/to/cloned/repository>`, `<imagename>`, and `<containername>` with
|
|||||||
```sh
|
```sh
|
||||||
docker logs <containername>
|
docker logs <containername>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user