Merge pull request #459 from 0xlynett/main

Use build args for Kinode version in Dockerfile
This commit is contained in:
nick.kino 2024-07-19 09:50:39 -07:00 committed by GitHub
commit b4813e4fdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -1,12 +1,12 @@
FROM debian:12-slim AS downloader
ARG VERSION
WORKDIR /tmp/download
RUN apt-get update
RUN apt-get install wget curl openssl jq unzip -y
RUN apt-get install unzip -y
ADD https://api.github.com/repos/kinode-dao/kinode/releases releases.json
RUN wget "https://github.com/kinode-dao/kinode/releases/download/$(cat releases.json | jq -r '.[0].tag_name')/kinode-x86_64-unknown-linux-gnu.zip"
ADD "https://github.com/kinode-dao/kinode/releases/download/${VERSION}/kinode-x86_64-unknown-linux-gnu.zip" kinode-x86_64-unknown-linux-gnu.zip
RUN unzip kinode-x86_64-unknown-linux-gnu.zip
FROM debian:12-slim

View File

@ -163,15 +163,17 @@ The image includes EXPOSE directives for TCP port `8080` and TCP port `9000`. Po
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.
To build a local Docker image, run the following command in this project root.
```
docker build -t 0xlynett/kinode .
```bash
# The `VERSION` may be replaced with the tag of a GitHub release
docker build -t 0xlynett/kinode . --build-arg VERSION=v0.8.6
```
For example:
```
```bash
docker volume create kinode-volume
docker run -d -p 8080:8080 -it --name my-kinode \
--mount type=volume,source=kinode-volume,destination=/kinode-home \
0xlynett/kinode
```
```