Skip to content
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

Create working multistage Dockerfile #163

Merged
merged 3 commits into from
Dec 29, 2021

Conversation

jbowen93
Copy link
Contributor

@jbowen93 jbowen93 commented Dec 16, 2021

Description

Create a new Dockerfile that meets the expectations of both the docker-compose and k8s cluster setups.

This means that the entrypoint to the container is the binary itself (celestia-appd in this case) .

It is expected that the appropriate arguments are passed to the container as if one was running the binary locally. Configuration isn't baked into the image and is expected to be passed as flags or using volume mounts.

For examples see docker-compose and k8s.

This has been manually tested using the following instructions:

cd celestia-app && docker build -f docker/Dockerfile -t jbowen93/celestia-app:multi .
cd devops-test/devnet && sed -i 's/jbowen93\/celestia-app:devnet/jbowen93\/celestia-app:multi/g' docker/docker-compose.yml
docker-compose -f docker/docker-compose.yml up

as well as with the devops-test/devnet/k8s cluster

closes: #153


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

Bidon15
Bidon15 previously approved these changes Dec 20, 2021
Copy link
Member

@Bidon15 Bidon15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢
Awesome job! The devops-test compose file looks slick and sick!

evan-forbes
evan-forbes previously approved these changes Dec 20, 2021
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome utACK

docker/priv_validator_state.json Outdated Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this Dockerfile is multi-stage and meets the requirements of k8s/compose setup, can we name it something ____.Dockerfile to indicate that this is its main use?

docker/Dockerfile Outdated Show resolved Hide resolved
Nits and typos

Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
@jbowen93 jbowen93 dismissed stale reviews from evan-forbes and Bidon15 via 5057c1d December 21, 2021 18:50
@jbowen93
Copy link
Contributor Author

Since this Dockerfile is multi-stage and meets the requirements of k8s/compose setup, can we name it something ____.Dockerfile to indicate that this is its main use?

My intention was that this would be the canonical and ideally only Dockerfile needed for this repository. As such I believe we should use the "top level" Dockerfile naming.

Copy link
Member

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@evan-forbes evan-forbes merged commit c2adcb1 into celestiaorg:master Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Docker Image that supports multi node setups with matching gentx/ dir and genesis.json
5 participants