From 90ad1a4f895be7cf618d595b3c1b04d7440a6f97 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 20 Feb 2025 17:20:49 +0100 Subject: [PATCH] fix(docker-compose-dev): correct permissions so git can read tags "git tag" is called (I think by hatch?) but git complains that it doesn't have the right permissions for this folder, therefor pyaleph refuses to start. --- deployment/docker-build/dev/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/docker-build/dev/Dockerfile b/deployment/docker-build/dev/Dockerfile index 3572c334..27895a76 100644 --- a/deployment/docker-build/dev/Dockerfile +++ b/deployment/docker-build/dev/Dockerfile @@ -58,8 +58,10 @@ RUN pip install hatch FROM base -COPY --from=builder /opt/venv /opt/venv -COPY --from=builder /opt/pyaleph /opt/pyaleph +RUN useradd -s /bin/bash aleph + +COPY --from=builder --chown=aleph /opt/venv /opt/venv +COPY --from=builder --chown=aleph /opt/pyaleph /opt/pyaleph RUN apt-get update && apt-get install -y \ libsodium23 \ @@ -72,9 +74,13 @@ COPY ./deployment/docker-build/openssl.cnf.patch /etc/ssl/openssl.cnf.patch RUN patch /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf.patch RUN mkdir /var/lib/pyaleph +RUN chown -R aleph:aleph /var/lib/pyaleph +RUN mkdir /home/aleph +RUN chown -R aleph:aleph /home/aleph ENV PATH="/opt/venv/bin:${PATH}" WORKDIR /opt/pyaleph +USER aleph RUN hatch build ENTRYPOINT ["bash", "deployment/scripts/run_aleph_ccn.sh"]