diff --git a/entrypoint.sh b/entrypoint.sh index 30d2c49..a03480a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,10 +5,10 @@ cd /chia-blockchain chia init if [[ ${keys} == "generate" ]]; then - echo "to use your own keys pass them as a variable -e keys=\"24words\"" + echo "to use your own keys pass them as a text file -v /path/to/keyfile:/path/in/container and -e keys=\"/path/in/container\"" chia keys generate else - echo "${keys}" | chia keys add + chia keys add -f ${keys} fi if [[ ! "$(ls -A /plots)" ]]; then diff --git a/readme.md b/readme.md index bbd2f3f..52b5207 100644 --- a/readme.md +++ b/readme.md @@ -10,9 +10,17 @@ docker run --name -d ghcr.io/chia-network/chia:latest You can modify the behavior of your Chia container by setting specific environment variables. -To use your own keys pass +To use your own keys pass as arguments on startup ``` --e keys="twenty four words" +-v /path/to/key/file:/path/in/continer -e keys="/path/incontainer" +``` +or pass keys into the running container +``` +docker exec -it venv/bin/chia keys add +``` +alternatively you can pass in your local keychain, if you have previously deployed chia with these keys on the host machine +``` +-v ~/.local/share/python_keyring/:/root/.local/share/python_keyring/ ``` To start a farmer only node pass @@ -25,9 +33,8 @@ To start a harvester only node pass -e harvester="true" -e farmer_address="addres.of.farmer" -e farmer_port="portnumber" ``` -#### or run the commands externally with venv +#### or run commands externally with venv (this works for most chia XYZ commands) ``` -docker exec -it chia venv/bin/chia keys add docker exec -it chia venv/bin/chia plots add -d /plots ```