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

feat(zkstack_cli): Add the ability to run the server from Docker without building it #3314

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

manuelmauro
Copy link
Contributor

@manuelmauro manuelmauro commented Nov 21, 2024

What ❔

Currently we always run the server using cargo run. If you are not a developer. it’s unnecessary to build everything from scratch.

❯ zkstack server run --mode docker

┌   ZK Stack CLI 
│
●  Starting server
│  
◆  Select image
│  ● latest 
│  ○ v25.2.0 
│  ○ v25.1.0 
│  ○ v25.0.0 
│  ○ v24.29.1 
│  ○ v24.29.0 
└

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@manuelmauro manuelmauro marked this pull request as ready for review November 27, 2024 09:56
Copy link
Contributor

@Deniallugo Deniallugo left a comment

Choose a reason for hiding this comment

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

LGTM, mostly nits

zkstack_cli/crates/common/src/server.rs Outdated Show resolved Hide resolved
zkstack_cli/crates/common/src/server.rs Outdated Show resolved Hide resolved
Deniallugo
Deniallugo previously approved these changes Nov 27, 2024
@manuelmauro
Copy link
Contributor Author

Update: currently checking the problem with exposing the ports to the host machine when running the server dockerized

@manuelmauro
Copy link
Contributor Author

manuelmauro commented Dec 3, 2024

Recent updates to the config files on the main branch were not backward compatible. This causes the command zkstack server --mode docker --tag latest to fail with:

thread 'main' panicked at core/node/eth_sender/src/aggregator.rs:76:72:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-12-03T09:36:56.978735Z DEBUG zksync_health_check: Changed health of `prometheus_exporter` from {"status":"not_ready"} to {"status":"panicked"}
2024-12-03T09:36:56.980158Z DEBUG zksync_health_check: Changed health of `tree` from {"status":"not_ready"} to {"status":"panicked"}

■  Command failed to run

■    Status:
exit status: 101
│    Stdout:


│    Stderr:


■  Failed to start server

▲    0: Failed to run server
│    1: Command failed to run: docker run --platform linux/amd64 -v ./chains/era/configs/genesis.yaml:/config/genesis.yaml -v ./chains/era/configs/wallets.yaml:/config/wallets.yaml -v ./chain

Error line

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.

2 participants