From 06d48bfac898fd22bb1e580bcd79ffc0def2a0fa Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Tue, 19 Sep 2023 21:30:21 -0400 Subject: [PATCH 1/5] feat: add -t and -i flags to docker run command so that docker container can be stopped with crtl c --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a2b7af..fcb8afd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ docker build . -t celestia-local-devnet To run the Docker container: ```bash -docker run \ +docker run -t -i \ -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ celestia-local-devnet ``` From 005dddfed7bdd776dc76cd1efba1fb297ecc3740 Mon Sep 17 00:00:00 2001 From: smuu <18609909+smuu@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:57:05 +0200 Subject: [PATCH 2/5] feat: add argument to both docker run commands --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fcb8afd..40475bf 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 \ +docker run -t -i \ -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ ghcr.io/rollkit/local-celestia-devnet:latest ``` From cd914d777a84dd9a786231f474ce34958a029ee4 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 21 Sep 2023 09:24:01 -0400 Subject: [PATCH 3/5] add -d flag for running the docker container in a detached state --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40475bf..005152f 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 \ +docker run -t -i -d \ -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 \ +docker run -t -i -d \ -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ celestia-local-devnet ``` From 3e28d27bdf1879ba43b868e9ec7f09806bd7d7dd Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 28 Sep 2023 09:18:18 -0400 Subject: [PATCH 4/5] 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 | From 9e280f73e6441e81df19216dc1c5dbf74f17959a Mon Sep 17 00:00:00 2001 From: Josh Stein <46639943+jcstein@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:42:15 -0400 Subject: [PATCH 5/5] Update README.md Co-authored-by: nashqueue <99758629+nashqueue@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9cb305..5e7c739 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ docker run -d -t -i \ 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 +To stop the container when you are detached from the container, you can use the `docker ps` command to find the container ID: ```bash