-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add instructions for running celestia-app via Docker #4168
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request introduces a new section titled "Docker" in the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
README.md (3)
45-45
: Add blank lines around the section headerFor better readability and consistency with markdown best practices, add blank lines before and after the "Docker Installation" heading.
+ ## Docker Installation +🧰 Tools
🪛 Markdownlint (0.37.0)
45-45: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
47-49
: Enhance Docker prerequisites sectionWhile the basic requirements are good, consider adding these important details:
- Instructions for verifying Docker version (
docker --version
)- How to check and modify Docker resource settings on different platforms
- Note about Docker daemon being running
1. Prerequisites - Ensure you have Docker version **20.10** or higher installed. You can download it from [Docker's official website](https://www.docker.com/get-started). - Allocate at least **2 CPU cores** and **4 GB of RAM** to Docker for optimal performance. This can be configured in Docker Desktop settings. + +To verify your Docker installation: +```bash +docker --version # Should show version 20.10 or higher +``` + +Resource allocation: +- **Windows/Mac**: Configure in Docker Desktop → Settings → Resources +- **Linux**: Resources are shared with the host system + +Ensure the Docker daemon is running: +```bash +docker info +```🧰 Tools
🪛 Markdownlint (0.37.0)
47-47: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
48-48: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
51-55
: Enhance Docker image pulling sectionThe basic pull command is correct, but consider adding these important details:
- Version tag options (latest vs specific versions)
- Image verification steps
- Brief explanation of using GitHub Container Registry
2. Fetching the Latest Tagged Release -To pull the latest tagged release of the `celestia-app` Docker image, run the following command: +The celestia-app Docker images are hosted on GitHub Container Registry (ghcr.io). You can either pull the latest version or a specific release: + +Pull the latest version: ```bash docker pull ghcr.io/celestiaorg/celestia-app:latest ``` + +Or pull a specific version (recommended for production): + ```bash + docker pull ghcr.io/celestiaorg/celestia-app:v1.0.0 # Replace with desired version + ``` + +Verify the image: + ```bash + docker image inspect ghcr.io/celestiaorg/celestia-app:latest + ```🧰 Tools
🪛 Markdownlint (0.37.0)
51-51: Expected: 1; Actual: 2; Style: 1/2/3
Ordered list item prefix(MD029, ol-prefix)
53-53: null
Fenced code blocks should be surrounded by blank lines(MD031, blanks-around-fences)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
README.md
60-60: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
45-45: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines
(MD022, blanks-around-headings)
51-51: Expected: 1; Actual: 2; Style: 1/2/3
Ordered list item prefix
(MD029, ol-prefix)
57-57: Expected: 2; Actual: 3; Style: 1/2/3
Ordered list item prefix
(MD029, ol-prefix)
53-53: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
62-62: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
47-47: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
48-48: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
62-62: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. I have a few nits to make this shorter and easier to read.
Also I think this needs to clarify which docker-compose.yml to use.
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
58-63
:⚠️ Potential issueCritical: Missing docker-compose.yml configuration
The instructions reference a
docker-compose.yml
file but don't provide its contents. This is a blocker for users trying to follow these instructions.Please add:
- A complete
docker-compose.yml
example with:
- Service configuration
- Volume mounts for persistence
- Port mappings
- Environment variables
- Expected behavior after startup
- Basic troubleshooting steps
Also, fix the code block formatting:
3. Running the Application To start the application using Docker Compose, navigate to the directory containing your `docker-compose.yml` file and run: - ```bash + ```bash docker-compose up ```🧰 Tools
🪛 Markdownlint (0.37.0)
61-61: Expected: 0 or 2; Actual: 1
Trailing spaces(MD009, no-trailing-spaces)
58-58: Expected: 2; Actual: 3; Style: 1/2/3
Ordered list item prefix(MD029, ol-prefix)
63-63: null
Fenced code blocks should be surrounded by blank lines(MD031, blanks-around-fences)
63-63: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
🧹 Nitpick comments (2)
README.md (2)
48-50
: Improve prerequisites section clarity and formatting
- The Docker version requirement (20.10) needs justification. Please add a brief note explaining why this specific version is required.
- Resource requirements should include context (e.g., "for running a validator node" or "for development").
Also, fix the list formatting:
### Docker + 1. Prerequisites + - Ensure you have Docker version **20.10** or higher installed. You can download it from [Docker's official website](https://www.docker.com/get-started). - Allocate at least **2 CPU cores** and **4 GB of RAM** to Docker for optimal performance. This can be configured in Docker Desktop settings.🧰 Tools
🪛 Markdownlint (0.37.0)
48-48: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
49-49: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
52-56
: Add image verification stepsThe image pulling instructions should include steps to verify the pulled image:
- Add a command to verify the image was pulled successfully
- Consider adding image digest verification for security
2. Fetching the Latest Tagged Release To pull the latest tagged release of the `celestia-app` Docker image, run the following command: + ```bash docker pull ghcr.io/celestiaorg/celestia-app:latest + # Verify the image + docker images ghcr.io/celestiaorg/celestia-app:latest ```🧰 Tools
🪛 Markdownlint (0.37.0)
52-52: Expected: 1; Actual: 2; Style: 1/2/3
Ordered list item prefix(MD029, ol-prefix)
54-54: null
Fenced code blocks should be surrounded by blank lines(MD031, blanks-around-fences)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
README.md
61-61: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
52-52: Expected: 1; Actual: 2; Style: 1/2/3
Ordered list item prefix
(MD029, ol-prefix)
58-58: Expected: 2; Actual: 3; Style: 1/2/3
Ordered list item prefix
(MD029, ol-prefix)
54-54: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
63-63: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
48-48: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
49-49: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
63-63: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
🔇 Additional comments (1)
README.md (1)
46-47
: LGTM: Heading placement is consistentThe "Docker" section is correctly placed as a subheading under "Install", maintaining consistency with other installation methods.
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My feedback hasn't been addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docker/docker-compose.yml (1)
6-6
: Consider using named volume for better data managementUsing a bind mount with relative path could lead to issues if the directory doesn't exist.
- - ./data:/root/.celestia-app + volumes: + celestia_data: + volumes: + - celestia_data:/root/.celestia-app + +volumes: + celestia_data:
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md
(1 hunks)docker/docker-compose.yml
(1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
README.md
51-51: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
57-57: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
55-55: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
56-56: null
Lists should be surrounded by blank lines
(MD032, blanks-around-lists)
🪛 yamllint (1.35.1)
docker/docker-compose.yml
[error] 1-1: wrong new line character: expected \n
(new-lines)
[error] 2-2: syntax error: expected , but found ''
(syntax)
[error] 10-10: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
The README doesn't conform to markdownlint. The docker-compose.yml file isn't valid. I'll fix and push |
docker/docker-compose.yml
Outdated
@@ -0,0 +1,10 @@ | |||
version: '3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use this docker-compose.yml for inspiration. Do you mind confirming it works by running docker compose start
on your machine and confirming the validator starts and remains up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing @rootulp. I ran it on my machine, but it failed to start because of some issues with the configuration and commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After modifying the compose file, I was able to get it running successfully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm committing the updated docker-compose file, the validator now starts and remains up as expected. Let me know if you’d like any details about the changes I made!
docker/docker-compose.yml
Outdated
- CHAIN_ID=celestia | ||
command: > | ||
sh -c " | ||
if [ ! -f /root/.celestia-app/config/genesis.json ]; then | ||
celestia-appd init $MONIKER --chain-id $CHAIN_ID && | ||
celestia-appd keys add validator --keyring-backend test && | ||
celestia-appd add-genesis-account $$(celestia-appd keys show validator -a --keyring-backend test) 10000000000utia && | ||
celestia-appd gentx validator 1000000000utia --chain-id $CHAIN_ID --keyring-backend test && | ||
celestia-appd collect-gentxs | ||
fi && | ||
celestia-appd start --rpc.laddr tcp://0.0.0.0:26657" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's confusing for this local chain to re-use the same chain-id as Mainnet Beta. Can this instead use the chain-id test
?
celestia-app/scripts/single-node.sh
Line 17 in e4c9f2d
CHAIN_ID="test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we can change the chain ID to "test" to avoid confusion with the mainnet
Also I'm observing these warnings:
|
Hi @rootulp, as you earlier mentioned there’s already a docker-compose.yml file in the local_devnet directory, but it seems designed for multiple nodes. So I’m a bit confused—do we need to create a new docker-compose.yml file specifically for running a single node, or can we use the existing one? |
Closes #3078
Description
Added Docker Installation Instructions to README.md
This PR introduces a new section in the README.md file for the celestia-app project, providing detailed instructions on how to install and run the application using Docker.
Changes Made:
Added a comprehensive Docker installation section, including: