From 70da600bd955640861b53244271c0d7964be869e Mon Sep 17 00:00:00 2001 From: Santiago Baldassin Date: Tue, 3 Oct 2023 15:54:28 -0300 Subject: [PATCH 1/2] DO-1878 make jammy dockerfile a little bit simpler --- node-runner-cli/Dockerfile.ubuntujammy | 28 ++++++++++---------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/node-runner-cli/Dockerfile.ubuntujammy b/node-runner-cli/Dockerfile.ubuntujammy index 9f7278d4..76207a67 100644 --- a/node-runner-cli/Dockerfile.ubuntujammy +++ b/node-runner-cli/Dockerfile.ubuntujammy @@ -3,32 +3,26 @@ MAINTAINER radixdlt ENV DEBIAN_FRONTEND noninteractive 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 + && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + git \ + python3-pip \ + python3-dev # Install pyenv RUN set -ex \ - && curl https://pyenv.run | bash \ - && pyenv update - - -RUN CONFIGURE_OPTS=--enable-shared pyenv install 3.10.6 + && curl https://pyenv.run | bash -RUN pyenv virtualenv 3.10.6 nodecli -RUN pyenv local nodecli -RUN pip install pipenv pyinstaller==4.10 +RUN pip install pipenv WORKDIR /app COPY Pipfile Pipfile.lock /app/ -ENV PYTHONPATH "/app/.venv/lib/python3.10/site-packages/:${PYTHONPATH}" -RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --python /root/.pyenv/shims/python +RUN PIPENV_VENV_IN_PROJECT=1 pipenv run pipenv install +RUN pipenv run pip install pyinstaller==4.10 COPY . /app -RUN pyinstaller --onefile --windowed babylonnode.spec +RUN pipenv run pyinstaller --onefile --windowed babylonnode.spec RUN DISABLE_VERSION_CHECK=true /app/dist/babylonnode version From 34064ba787bd4b395c42b36116b7646f71c75f66 Mon Sep 17 00:00:00 2001 From: Santiago Baldassin Date: Tue, 3 Oct 2023 16:05:10 -0300 Subject: [PATCH 2/2] DO-1878 replicating the changes to focal --- node-runner-cli/Dockerfile.ubuntufocal | 27 +++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/node-runner-cli/Dockerfile.ubuntufocal b/node-runner-cli/Dockerfile.ubuntufocal index 46450df2..e6941da6 100644 --- a/node-runner-cli/Dockerfile.ubuntufocal +++ b/node-runner-cli/Dockerfile.ubuntufocal @@ -3,31 +3,26 @@ MAINTAINER radixdlt ENV DEBIAN_FRONTEND noninteractive 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 + && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + git \ + python3-pip \ + python3-dev # Install pyenv RUN set -ex \ - && curl https://pyenv.run | bash \ - && pyenv update - -RUN CONFIGURE_OPTS=--enable-shared pyenv install 3.10.6 + && curl https://pyenv.run | bash -RUN pyenv virtualenv 3.10.6 nodecli -RUN pyenv local nodecli -RUN pip install pyinstaller==4.10 pipenv +RUN pip install pipenv WORKDIR /app COPY Pipfile Pipfile.lock /app/ -ENV PYTHONPATH "/app/.venv/lib/python3.10/site-packages/:${PYTHONPATH}" -RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --python /root/.pyenv/shims/python +RUN PIPENV_VENV_IN_PROJECT=1 pipenv run pipenv install +RUN pipenv run pip install pyinstaller==4.10 COPY . /app -RUN pyinstaller --onefile --windowed babylonnode.spec +RUN pipenv run pyinstaller --onefile --windowed babylonnode.spec RUN DISABLE_VERSION_CHECK=true /app/dist/babylonnode version