Skip to content

Commit 911b35f

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 a9e648f commit 911b35f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

deployment/docker-build/dev/Dockerfile

Lines changed: 8 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,13 @@ 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
78+
RUN mkdir /home/aleph
79+
RUN chown -R aleph:aleph /home/aleph
7580

7681
ENV PATH="/opt/venv/bin:${PATH}"
7782
WORKDIR /opt/pyaleph
83+
USER aleph
7884

7985
RUN hatch build
8086
ENTRYPOINT ["bash", "deployment/scripts/run_aleph_ccn.sh"]

0 commit comments

Comments
 (0)