From 3ba084bb6a0487a1cd770f222672cf82562138d2 Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:03:44 +0200 Subject: [PATCH 1/6] Update install.md to add Docker install instructions https://github.com/kinode-dao/kinode/pull/299 --- src/install.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/install.md b/src/install.md index 3887161b..141f40e2 100644 --- a/src/install.md +++ b/src/install.md @@ -4,10 +4,49 @@ This section will teach you how to get the Kinode OS core software, required to After acquiring the software, you can learn how to run it and [Join the Network](./login.md). However, if you are just interested in starting development as fast as possible, start with [My First Kinode Application](./my_first_app/chapter_1.md). +If you want to make edits to the Kinode core software, see [Build From Source](#build-from-source). + +## Docker + +The recommended method for Linux users is to use a prebuilt Docker image. Other operating systems are not yet supported: use the binary instead. + +### Installing Docker + +First, install the Docker Engine. Instructions will be different depending on your distribution, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/engine/install/) + +Make sure to perform any post-install necessary afterwards, such as adding your user to the `docker` group. + +### Docker Image + +The image expects a volume mounted at `/kinode`. This volume may be empty or may contain another Kinode's data. It will be used as the home directory of your Kinode. + +The image includes EXPOSE directives for TCP port `8080` and TCP port `9000`. Port `8080` is used for serving the Kinode web dashboard over HTTP, and it may be mapped to a different port on the host. Port `9000` is optional and is only required for a direct node. + +If you are running a direct node, you must map port `9000` to the same port on the host and on your router. Otherwise, your Kinode will not be able to connect to the rest of the network as connection info is written to the chain, and this information is based on the view from inside the Docker container. + +Run the following command to create a volume: +```bash +docker volume create kinode-volume +``` + +Then run the following command to create the container: +```bash +docker run -d -p 8080:8080 -it --name my-kinode \ + --mount type=volume,source=kinode-volume,destination=/kinode \ + 0xlynett/kinode +``` +(replace `kinode-volume` with the name of your volume) + +Check the status of your Docker processes with `docker ps`. +To start and stop the container, use `docker start my-kinode` or `docker stop my-kinode`. +To remove the container, run `docker remove my-kinode`. +(replace `my-kinode` with the name of your container) + +As long as the volume is not deleted, your data remains intact upon removal or stop. + ## Download Binary -The recommended method for most users is to use a precompiled binary. -If you want to make edits to the Kinode core software, see [Build From Source](#build-from-source). +If you do not have Docker, you can download a precompiled binary instead. First, get the software itself by downloading a [precompiled release binary](https://github.com/kinode-dao/kinode/releases). Choose the correct binary for your particular computer architecture and OS. From 22cb3332b7b917f360990356310838524f45a4a3 Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:09:28 +0200 Subject: [PATCH 2/6] Update home dir to /kinode-home --- src/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.md b/src/install.md index 141f40e2..c28c7b10 100644 --- a/src/install.md +++ b/src/install.md @@ -32,7 +32,7 @@ docker volume create kinode-volume Then run the following command to create the container: ```bash docker run -d -p 8080:8080 -it --name my-kinode \ - --mount type=volume,source=kinode-volume,destination=/kinode \ + --mount type=volume,source=kinode-volume,destination=/kinode-home \ 0xlynett/kinode ``` (replace `kinode-volume` with the name of your volume) From 0a4504a80fb9e88c76d24d453bc8af5bb399e869 Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:35:52 +0200 Subject: [PATCH 3/6] 1 sentence per line --- src/install.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/install.md b/src/install.md index c28c7b10..e0bf9a96 100644 --- a/src/install.md +++ b/src/install.md @@ -12,17 +12,23 @@ The recommended method for Linux users is to use a prebuilt Docker image. Other ### Installing Docker -First, install the Docker Engine. Instructions will be different depending on your distribution, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/engine/install/) +First, install the Docker Engine. +Instructions will be different depending on your distribution, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/engine/install/) Make sure to perform any post-install necessary afterwards, such as adding your user to the `docker` group. ### Docker Image -The image expects a volume mounted at `/kinode`. This volume may be empty or may contain another Kinode's data. It will be used as the home directory of your Kinode. +The image expects a volume mounted at `/kinode`. +This volume may be empty or may contain another Kinode's data. +It will be used as the home directory of your Kinode. -The image includes EXPOSE directives for TCP port `8080` and TCP port `9000`. Port `8080` is used for serving the Kinode web dashboard over HTTP, and it may be mapped to a different port on the host. Port `9000` is optional and is only required for a direct node. +The image includes EXPOSE directives for TCP port `8080` and TCP port `9000`. +Port `8080` is used for serving the Kinode web dashboard over HTTP, and it may be mapped to a different port on the host. +Port `9000` is optional and is only required for a direct node. -If you are running a direct node, you must map port `9000` to the same port on the host and on your router. Otherwise, your Kinode will not be able to connect to the rest of the network as connection info is written to the chain, and this information is based on the view from inside the Docker container. +If you are running a direct node, you must map port `9000` to the same port on the host and on your router. +Otherwise, your Kinode will not be able to connect to the rest of the network as connection info is written to the chain, and this information is based on the view from inside the Docker container. Run the following command to create a volume: ```bash From 4138111d0f1f95075bb63c5ad6e66c70657b6f70 Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:36:08 +0200 Subject: [PATCH 4/6] /kinode -> /kinode-home --- src/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.md b/src/install.md index e0bf9a96..57b4eb07 100644 --- a/src/install.md +++ b/src/install.md @@ -19,7 +19,7 @@ Make sure to perform any post-install necessary afterwards, such as adding your ### Docker Image -The image expects a volume mounted at `/kinode`. +The image expects a volume mounted at `/kinode-home`. This volume may be empty or may contain another Kinode's data. It will be used as the home directory of your Kinode. From 8954a7b04d074d92dd50cf4829d1511d3e7ca494 Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:52:52 +0200 Subject: [PATCH 5/6] Update install.md --- src/install.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/install.md b/src/install.md index 57b4eb07..31558a82 100644 --- a/src/install.md +++ b/src/install.md @@ -8,26 +8,30 @@ If you want to make edits to the Kinode core software, see [Build From Source](# ## Docker -The recommended method for Linux users is to use a prebuilt Docker image. Other operating systems are not yet supported: use the binary instead. +The recommended method for Linux and MacOS users is to use a prebuilt Docker image. +Windows may work but is not yet officially supported: use the binary instead. ### Installing Docker -First, install the Docker Engine. -Instructions will be different depending on your distribution, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/engine/install/) +First, install Docker. +Instructions will be different depending on your OS, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/get-docker/) -Make sure to perform any post-install necessary afterwards, such as adding your user to the `docker` group. +If you are using Linux, make sure to perform any post-install necessary afterwards. +[The official Docker website has optional post-install instructions.]https://docs.docker.com/engine/install/linux-postinstall/) ### Docker Image The image expects a volume mounted at `/kinode-home`. This volume may be empty or may contain another Kinode's data. It will be used as the home directory of your Kinode. +Each volume is unique to each Kinode. +If you want to run multiple Kinodes, create multiple volumes. The image includes EXPOSE directives for TCP port `8080` and TCP port `9000`. Port `8080` is used for serving the Kinode web dashboard over HTTP, and it may be mapped to a different port on the host. Port `9000` is optional and is only required for a direct node. -If you are running a direct node, you must map port `9000` to the same port on the host and on your router. +If you are running a direct node, you **must** map port `9000` to the same port on the host and on your router. Otherwise, your Kinode will not be able to connect to the rest of the network as connection info is written to the chain, and this information is based on the view from inside the Docker container. Run the following command to create a volume: @@ -35,13 +39,14 @@ Run the following command to create a volume: docker volume create kinode-volume ``` -Then run the following command to create the container: +Then run the following command to create the container. +Replace `kinode-volume` with the name of your volume, and `my-kinode` with a unique name. +To map the port to a different port (for example, `80` or `6969`), change `8080:8080` to `PORT:8080`, where `PORT` is the post on the host machine. ```bash -docker run -d -p 8080:8080 -it --name my-kinode \ +docker run -d -p 127.0.0.1:8080:8080 -it --name my-kinode \ --mount type=volume,source=kinode-volume,destination=/kinode-home \ 0xlynett/kinode ``` -(replace `kinode-volume` with the name of your volume) Check the status of your Docker processes with `docker ps`. To start and stop the container, use `docker start my-kinode` or `docker stop my-kinode`. @@ -49,6 +54,7 @@ To remove the container, run `docker remove my-kinode`. (replace `my-kinode` with the name of your container) As long as the volume is not deleted, your data remains intact upon removal or stop. +If you need further help with Docker, [access the official Docker documentation here](https://docs.docker.com/manuals/). ## Download Binary From d3a8db3947bebab0d7956e2e68866c2613c94d4a Mon Sep 17 00:00:00 2001 From: 0xLyn <125699416+0xlynett@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:53:11 +0200 Subject: [PATCH 6/6] Fix link --- src/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.md b/src/install.md index 31558a82..3c04609a 100644 --- a/src/install.md +++ b/src/install.md @@ -17,7 +17,7 @@ First, install Docker. Instructions will be different depending on your OS, but it is recommended to follow [the method outlined in the official Docker website.](https://docs.docker.com/get-docker/) If you are using Linux, make sure to perform any post-install necessary afterwards. -[The official Docker website has optional post-install instructions.]https://docs.docker.com/engine/install/linux-postinstall/) +[The official Docker website has optional post-install instructions.](https://docs.docker.com/engine/install/linux-postinstall/) ### Docker Image