2024-10-10 12:41:16 +00:00
|
|
|
# Quartz Neutrond image
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
This folder contains a `Dockerfile` that helps build a single-node [neutrond]
|
|
|
|
for use in testing your Quartz application.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
It facilitates the creation of a Docker image with 4 accounts pre-loaded, each
|
|
|
|
having a small amount of `untrn` preloaded from genesis for experimentation.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
- `admin`
|
|
|
|
- `alice`
|
|
|
|
- `bob`
|
|
|
|
- `charlie`
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
These accounts' details are stored in clear text in the [data/accounts](./data/accounts/)
|
|
|
|
folder.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
**Note: this image is _NOT_ intended to be used in production.**
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
## Using the image
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
For running this image you can just use the already prepared [docker-compose.yml](../docker-compose.yml)
|
|
|
|
file by simply run at `docker` folder root level:
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
```bash
|
|
|
|
docker compose up node
|
2024-08-01 22:31:52 +00:00
|
|
|
```
|
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
## Importing the account keys
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
As previously mentioned, the [data/accounts](./data/accounts/) folder contains all of
|
|
|
|
the necessary material to construct the public/private keypairs of the accounts.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
A convenient helper target is provided in [`/Makefile`](./Makefile) to facilitate
|
|
|
|
importing of these accounts into a local `neutrond` configuration (i.e. on your
|
|
|
|
host machine, outside of the Docker container). This will allow you to transact
|
|
|
|
on behalf of any of those accounts from outside of the Docker container.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
**NB**: For this to work, you will need the same version of `neutrond` installed on
|
|
|
|
your local machine as what is built into the `neutrond` Docker image.
|
2024-08-01 22:31:52 +00:00
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
```bash
|
|
|
|
make import-local-accounts
|
2024-08-01 22:31:52 +00:00
|
|
|
```
|
|
|
|
|
2024-10-10 12:41:16 +00:00
|
|
|
To check that the accounts have been imported correctly, on your host machine
|
|
|
|
run:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# List all keys available in your local neutrond configuration
|
|
|
|
neutrond keys list --keyring-backend=test
|
|
|
|
```
|