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

Add floresta-cli to Docker image #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lukechilds
Copy link

Allows easy usage like

$ docker run --detach --name floresta --volume floresta:/data floresta florestad --data-dir /data
fda244c1a43cad76f45b8615a0ff20628cebd36c4f927b2984b5f106887158df

$ docker exec floresta floresta-cli getblockchaininfo
{
  "best_block": "00000000000000000001c1f5a0f1864a6dc29d6fc1e7d0e66d5831aaee69e908",
  "height": 871039,
  "ibd": true,
  "validated": 855611,
  "latest_work": "439336363866695155673542",
  "latest_block_time": 1732023060,
  "leaf_count": 2588053492,
  "root_count": 16,
  "root_hashes": [
    "0abad777a20146eb4a48ee01d4152f5c36c9a7ffc400058723c03a9d3f664585",
    "0ebafacf7163e201d160ed952a9e4024ba2bdf768317d6e877609dc7d1d76e59",
    "32888e0c96b66e9ae575628c08991c362a0e4ae6a564308329977bc2c8c2e8e6",
    "ad38b638d39c3cc421361bc8392da7720f031cba3a0f35ed135245c03e11a247",
    "cffcc620aaa8b46b23924c16b51a53630d35b5c355943ce42aff586f43332df8",
    "a54e07fedf09245c10ebd702aab51398de5f931c7cddd9f93d55fff5f72f8ca0",
    "9155acb044dcc81ae71f594cab3f04818f5a64a4e5801fbf3cf34ec07e330af9",
    "06c2645bd1d0f60839e47a359f1bb624f2e5635cec998b2664aeef36ef3943e9",
    "ba89df87509db1457115e579d2bd45ac284ee9dd704e514e77579d2f8e209c56",
    "0971d033b1497d62b951356328509c05e3ef7c172088bc263145b99c81d49a09",
    "7e12d784ca1577eb43b977d2bcd7f4937c721f5a6c12947c20876aaf2d8c3ebe",
    "e1ca6e984044a503ff2f0de3bfacb8c8d406583e61ca73e15b14cae0b40c4e68",
    "b657e6bfe5b9413d07cd58f6bfbcb4a00d2f7e2c955ce8a24a5eb72aabdfcab2",
    "49893a5b518b5adfc1b07672c33eb5746a895f84c409f808f3c5ae7d42dcd547",
    "2405e8d0c05073996b510e009c81b808c139e55d5b95f7890817b94f8b8c53ee",
    "431ab140bd64e1890a0d756c1f77aa56f99ba1ad3130a017cb2537b583a84803"
  ],
  "chain": "bitcoin",
  "progress": 0.9822878,
  "difficulty": 102289407543323
}

@lukechilds
Copy link
Author

lukechilds commented Nov 19, 2024

Just fyi the built binary is floresta_cli but I renamed to floresta-cli when copying. I'm assuming that's what you want? Is that a Cargo thing that build assets can't have dashes? Not too familiar with Rust.

@jaoleal
Copy link
Contributor

jaoleal commented Nov 19, 2024

Just fyi the built binary is floresta_cli but I renamed to floresta-cli when copying. I'm assuming that's what you want? Is that a Cargo thing that build assets can't have dashes? Not too familiar with Rust.

Thats weird... cargo doesnt like hyphens on libs it raises:

$ cargo build -p floresta-cli


error: failed to load manifest for workspace member `/home/user/code/Floresta/crates/floresta-cli`

Caused by:
  failed to parse manifest at `/home/user/code/Floresta/crates/floresta-cli/Cargo.toml`

Caused by:
  library target names cannot contain hyphens: floresta-cli

if i name it floresta-cli directly in its cargo.toml...

But the built binary by $ cargo build -p floresta-cli stills floresta-cli in the end... (at least on my machine 😆 ). Perhaps youre copying the lib instead of the proper executable, no ?

I cant review more than this because im not a docker guy but this looks a nice feature to have, gj.

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