You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "IronCore864 (via GitHub)" <gi...@apache.org> on 2023/07/02 10:35:28 UTC
[GitHub] [incubator-devlake] IronCore864 commented on a diff in pull request #5583: feat: make lake run with non-root users
IronCore864 commented on code in PR #5583:
URL: https://github.com/apache/incubator-devlake/pull/5583#discussion_r1249419015
##########
backend/Dockerfile:
##########
@@ -132,19 +131,23 @@ RUN apt-get update && \
EXPOSE 8080
+RUN useradd -ms /bin/bash devlake -u 1010
+USER devlake
+ENV PYTHONUNBUFFERED=1
+
WORKDIR /app
# Setup Python
COPY python/ /app/python/
RUN python3 -m pip install --no-cache --upgrade pip setuptools && \
- python3 -m pip install --no-cache -r python/requirements.txt && \
- rm -fr /usr/share/python-wheels/*
+ python3 -m pip install --no-cache -r python/requirements.txt
+
# Setup Python Poetry package manager
RUN curl -sSL https://install.python-poetry.org | python3 -
-RUN ln -sf /root/.local/bin/poetry /usr/local/bin
-# Build Python plugins
-RUN find /app/python/ -name "*.sh" | xargs -I{} chmod +x {}
-RUN /app/python/build.sh
+ENV PATH="$PATH:/home/devlake/.local/bin"
+# Build Python plugins, make sure the scripts has execute permission
+#RUN find /app/python/ -name "*.sh" | xargs -I{} chmod +x {}
Review Comment:
missing space here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org