From ecc71baf61673d45a5b11b739f1d38183e506f25 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 28 Sep 2021 18:43:28 -0300 Subject: [PATCH] add dockerfile for dht node --- docker/Dockerfile.dht_node | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docker/Dockerfile.dht_node diff --git a/docker/Dockerfile.dht_node b/docker/Dockerfile.dht_node new file mode 100644 index 000000000..d44370fc5 --- /dev/null +++ b/docker/Dockerfile.dht_node @@ -0,0 +1,38 @@ +FROM debian:10-slim + +ARG user=lbry +ARG projects_dir=/home/$user + +ARG DOCKER_TAG +ARG DOCKER_COMMIT=docker +ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT + +RUN apt-get update && \ + apt-get -y --no-install-recommends install \ + wget \ + automake libtool \ + tar unzip \ + build-essential \ + pkg-config \ + libleveldb-dev \ + python3.7 \ + python3-dev \ + python3-pip \ + python3-wheel \ + python3-setuptools && \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \ + rm -rf /var/lib/apt/lists/* + +RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user + +COPY . $projects_dir +RUN chown -R $user:$user $projects_dir + +USER $user +WORKDIR $projects_dir + +RUN make install +RUN python3 docker/set_build.py +RUN rm ~/.cache -rf +ENTRYPOINT ["python3", "scripts/dht_node.py"] +