From 9a678fcd31602018cb1aad99e23486d9a6c119a1 Mon Sep 17 00:00:00 2001 From: Boris P Date: Wed, 21 Jun 2023 00:57:20 -0600 Subject: [PATCH 1/5] Create Dockerfile.ubuntujammy --- node-runner-cli/Dockerfile.ubuntujammy | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 node-runner-cli/Dockerfile.ubuntujammy diff --git a/node-runner-cli/Dockerfile.ubuntujammy b/node-runner-cli/Dockerfile.ubuntujammy new file mode 100644 index 0000000..679a364 --- /dev/null +++ b/node-runner-cli/Dockerfile.ubuntujammy @@ -0,0 +1,43 @@ +FROM ubuntu:22.04 as BUILD +MAINTAINER radixdlt + +ENV DEBIAN_FRONTEND noninteractive +ENV PYTHON_VERSION 3.10 + +CMD /bin/bash + +RUN apt-get update \ + && apt-get install -y --no-install-recommends make build-essential libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ + libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev ca-certificates git > /dev/null + + + +ENV PYENV_ROOT /root/.pyenv +ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH + +# Install pyenv +RUN set -ex \ + && curl https://pyenv.run | bash \ + && pyenv update + + +RUN CONFIGURE_OPTS=--enable-shared pyenv install 3.10 + + + +RUN pyenv virtualenv 3.10 nodecli +RUN pyenv local nodecli +RUN pip install pyinstaller==4.10 + +WORKDIR /app +COPY requirements.txt /app/requirements.txt +RUN pip install -r requirements.txt + +COPY . /app +RUN pyinstaller --onefile --windowed radixnode.spec + +RUN DISABLE_VERSION_CHECK=true /app/dist/radixnode version + +FROM scratch AS export-stage +COPY --from=BUILD /app/dist / From 851eee00d0e4eaf70e389518fe2d0c4ecda01aa6 Mon Sep 17 00:00:00 2001 From: Boris P Date: Wed, 21 Jun 2023 01:01:43 -0600 Subject: [PATCH 2/5] Makefile: add jammy support --- node-runner-cli/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-runner-cli/Makefile b/node-runner-cli/Makefile index 6835645..13c9b99 100644 --- a/node-runner-cli/Makefile +++ b/node-runner-cli/Makefile @@ -3,12 +3,15 @@ install: $(shell chmod +x add-version.sh) $(shell ./add-version.sh) pip install pipenv - pipenv lock -r > requirements.txt + pipenv requirements > requirements.txt .PHONY: output output-ubuntu-focal: install DOCKER_BUILDKIT=1 docker build --output type=local,dest=out/ubuntu/focal --progress plain -f Dockerfile.ubuntufocal . +output-ubuntu-jammy: install + DOCKER_BUILDKIT=1 docker build --output type=local,dest=out/ubuntu/jammy --progress plain -f Dockerfile.ubuntujammy . + .PHONY: local local: install pip install -r requirements.txt From d02c93da42d6c711cd60acc3e76e194eb5e48d66 Mon Sep 17 00:00:00 2001 From: Boris P Date: Wed, 21 Jun 2023 01:16:26 -0600 Subject: [PATCH 3/5] Update Readme.adoc --- Readme.adoc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Readme.adoc b/Readme.adoc index b164ba5..f281019 100644 --- a/Readme.adoc +++ b/Readme.adoc @@ -95,3 +95,32 @@ optional arguments: ---- +== Build instructions + +Install Docker Engine: + +https://docs.docker.com/engine/install/ubuntu/ + +Post docker install, add current user to docker group: + +https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user + +Ubuntu: +[source, bash] +---- +sudo apt-get -y install build-essential python3 python3-env + +python3 -m pip install pipenv + +# For Ubuntu Jammy ( 22.04 ): +make output-ubuntu-jammy +chmod +x out/ubuntu/jammy/radixnode +sudo cp out/ubuntu/jammy/radixnode /usr/local/bin/radixnode + + +# For Ubuntu Focal ( 20.04 ): +make output-ubuntu-jammy +chmod +x out/ubuntu/focal/radixnode +sudo cp out/ubuntu/focal/radixnode /usr/local/bin/radixnode + +---- From 91f9dd0b95ea3363c00a3415aded5171c067031d Mon Sep 17 00:00:00 2001 From: Boris P Date: Wed, 21 Jun 2023 01:17:32 -0600 Subject: [PATCH 4/5] Update Readme.adoc --- Readme.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.adoc b/Readme.adoc index f281019..b5d0abc 100644 --- a/Readme.adoc +++ b/Readme.adoc @@ -119,7 +119,7 @@ sudo cp out/ubuntu/jammy/radixnode /usr/local/bin/radixnode # For Ubuntu Focal ( 20.04 ): -make output-ubuntu-jammy +make output-ubuntu-focal chmod +x out/ubuntu/focal/radixnode sudo cp out/ubuntu/focal/radixnode /usr/local/bin/radixnode From 5ac86eea8b4d04118919a8ce541397919f702e66 Mon Sep 17 00:00:00 2001 From: Boris P Date: Wed, 21 Jun 2023 01:19:32 -0600 Subject: [PATCH 5/5] Update Readme.adoc --- Readme.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.adoc b/Readme.adoc index b5d0abc..6c5296d 100644 --- a/Readme.adoc +++ b/Readme.adoc @@ -95,7 +95,7 @@ optional arguments: ---- -== Build instructions +== Build and install instructions Install Docker Engine: