Skip to content

Commit 83be382

Browse files
committed
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.
1 parent 5e00ef1 commit 83be382

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deployment/docker-build/dev/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ RUN pip install hatch
5858

5959
FROM base
6060

61-
COPY --from=builder /opt/venv /opt/venv
62-
COPY --from=builder /opt/pyaleph /opt/pyaleph
61+
RUN useradd -s /bin/bash aleph
62+
63+
COPY --from=builder --chown=aleph /opt/venv /opt/venv
64+
COPY --from=builder --chown=aleph /opt/pyaleph /opt/pyaleph
6365

6466
RUN apt-get update && apt-get install -y \
6567
libsodium23 \
@@ -72,9 +74,11 @@ COPY ./deployment/docker-build/openssl.cnf.patch /etc/ssl/openssl.cnf.patch
7274
RUN patch /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf.patch
7375

7476
RUN mkdir /var/lib/pyaleph
77+
RUN chown -R aleph:aleph /var/lib/pyaleph
7578

7679
ENV PATH="/opt/venv/bin:${PATH}"
7780
WORKDIR /opt/pyaleph
81+
USER aleph
7882

7983
RUN hatch build
8084
ENTRYPOINT ["bash", "deployment/scripts/run_aleph_ccn.sh"]

0 commit comments

Comments
 (0)