From 3e28d27bdf1879ba43b868e9ec7f09806bd7d7dd Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 28 Sep 2023 09:18:18 -0400 Subject: [PATCH] add -d flag as optional and include stopping instructions --- README.md | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 005152f..b9cb305 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ devnet node for testing without depending on the network or service. ## To run the Docker image from ghcr.io ```bash -docker run -t -i -d \ +docker run -t -i \ -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ ghcr.io/rollkit/local-celestia-devnet:latest ``` @@ -34,7 +34,7 @@ docker build . -t celestia-local-devnet To run the Docker container: ```bash -docker run -t -i -d \ +docker run -t -i \ -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ celestia-local-devnet ``` @@ -45,6 +45,41 @@ Test that the HTTP gateway server is up: curl -X GET http://127.0.0.1:26659/head ``` +## Running a Detached Container + +If you would like the run the container in the background, you can use the +`-d` flag: + +```bash +docker run -d -t -i \ + -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ + celestia-local-devnet +``` + +## Stopping the Container + +To stop the container when you are attached to the container, you can use +`Ctrl+C` to stop the container. + +To stop the container when ou are detached from the container, you can use the +`docker ps` command to find the container ID: + +```bash +docker ps +``` + +Then, use the `docker stop` command to stop the container: + +```bash +docker stop +``` + +To remove the container, use the `docker rm` command to remove the container: + +```bash +docker rm +``` + ## Exposed Ports | Port | Protocol | Address | Description | Node Type |