From b5c390ca0440a057e53b27a9abd8521724b8e159 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 25 Jul 2022 09:50:26 -0300 Subject: [PATCH] docker: add volume declaration --- docker/Dockerfile.dht_node | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/Dockerfile.dht_node b/docker/Dockerfile.dht_node index 9399911d9..ce91ec961 100644 --- a/docker/Dockerfile.dht_node +++ b/docker/Dockerfile.dht_node @@ -2,6 +2,7 @@ FROM debian:10-slim ARG user=lbry ARG projects_dir=/home/$user +ARG db_dir=/database ARG DOCKER_TAG ARG DOCKER_COMMIT=docker @@ -27,6 +28,8 @@ RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user COPY . $projects_dir RUN chown -R $user:$user $projects_dir +RUN mkdir -p $db_dir +RUN chown -R $user:$user $db_dir USER $user WORKDIR $projects_dir @@ -35,5 +38,6 @@ RUN python3 -m pip install -U setuptools pip RUN make install RUN python3 docker/set_build.py RUN rm ~/.cache -rf +VOLUME $db_dir ENTRYPOINT ["python3", "scripts/dht_node.py"]