From ea1e6327cd910cb51514b093710bc60e4e462620 Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Mon, 4 Mar 2024 20:05:34 +0100 Subject: [PATCH] Simplify Dockerfile --- Dockerfile | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4fb4abfc3..f3d9f1b106 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,31 +4,15 @@ FROM ubuntu:22.04 RUN apt-get update -# avoid interactive dialog -RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata -# install add-apt-repository -RUN apt-get install -y software-properties-common -# add deadsnakes ppa repository -RUN add-apt-repository ppa:deadsnakes/ppa -y -RUN apt-get update -# install python3.11 and other dependencies -RUN apt-get install -y build-essential python3.11 python3.11-dev libleveldb-dev curl git - -# install pip3.11 -RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 -RUN pip3.11 install --upgrade pip - -# set python3.11 as default python -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 +# install dependencies +RUN apt-get install -y python3 python3-dev python3-pip libleveldb-dev curl # install rust RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" # install maturin -RUN pip3.11 install maturin -# Fix ERROR: Cannot uninstall 'blinker'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. -RUN apt-get remove python3-blinker -y +RUN pip3 install maturin # copy repository COPY README.md /README.md @@ -39,15 +23,12 @@ COPY ./counterparty-cli /counterparty-cli # install counterparty-lib WORKDIR /counterparty-rs RUN cargo build -RUN pip3.11 install . +RUN pip3 install . # install counterparty-lib WORKDIR /counterparty-lib -RUN pip3.11 install . +RUN pip3 install . # install counterparty-cli WORKDIR /counterparty-cli -RUN pip3.11 install . - -# expose API port -EXPOSE 4000 +RUN pip3 install .