Skip to content
This repository was archived by the owner on Apr 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:bullseye

ENV REQUIRED_PACKAGES git clang curl libssl-dev llvm libudev-dev

RUN apt-get update \
&& apt-get install -y $REQUIRED_PACKAGES \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& $HOME/.cargo/bin/rustup default stable \
&& $HOME/.cargo/bin/rustup update \
&& $HOME/.cargo/bin/rustup update nightly \
&& $HOME/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly

RUN apt-get update \
&& apt-get install -y clang-9 \
&& git clone https://github.com/mintlayer/core \
&& cd core \
&& $HOME/.cargo/bin/cargo build --release

WORKDIR /core

EXPOSE 30333

CMD RUST_LOG=info target/release/mintlayer-core --base-path /tmp/ml-core --chain=assets/Testnet1Spec.json
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ Let's look at these flags in detail:
| `--node-key <key>` | The Ed25519 secret key to use for `libp2p` networking. The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. |
| `--telemetry-url` | Tells the node to send telemetry data to a particular server. The one we've chosen here is hosted by Parity and is available for anyone to use. You may also host your own (beyond the scope of this article) or omit this flag entirely. |
| `--validator` | Means that we want to participate in block production and finalization rather than just sync the network. |

## Docker setup

Alternatively, Docker can be used to launch a Mintlayer node. In the root directory, run:

```
docker build -t mintlayer-core .
docker run -t mintlayer-core
```

If you want to save the blockchain to host, run:
```
docker run -v ~/ml-blockchain:/tmp/ml-core -t mintlayer-core
```

## Create a chain specification

In the preceding example, we used `--chain local` which is a predefined "chain spec" that has Alice and Bob specified as validators along with many other useful defaults.
Expand Down