From 9e1f056d180472ec637404affa1776591371b49f Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Thu, 23 May 2024 17:38:39 -0300 Subject: [PATCH] chore: Update Dockerfile to remove unnecessary useradd command and fix pip installation --- build_and_push.Dockerfile | 6 +++--- build_and_push_base.Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build_and_push.Dockerfile b/build_and_push.Dockerfile index e27599454..3e9e18dab 100644 --- a/build_and_push.Dockerfile +++ b/build_and_push.Dockerfile @@ -78,9 +78,9 @@ RUN $POETRY_HOME/bin/poetry build # Copy virtual environment and built .tar.gz from builder base RUN useradd -m -u 1000 user +USER user # Install the package from the .tar.gz -RUN python -m pip install /app/dist/*.tar.gz --user - +RUN python -m pip install /app/dist/*.tar.gz ENTRYPOINT ["python", "-m", "langflow", "run"] -CMD ["--host", "0.0.0.0", "--port", "7860"] \ No newline at end of file +CMD ["--host", "0.0.0.0", "--port", "7860"] diff --git a/build_and_push_base.Dockerfile b/build_and_push_base.Dockerfile index cbcdbceee..bc174bf70 100644 --- a/build_and_push_base.Dockerfile +++ b/build_and_push_base.Dockerfile @@ -83,8 +83,9 @@ RUN cd src/backend/base && $POETRY_HOME/bin/poetry build --format sdist # Copy virtual environment and built .tar.gz from builder base RUN useradd -m -u 1000 user # Install the package from the .tar.gz -RUN python -m pip install /app/dist/*.tar.gz --user +USER user +RUN python -m pip install /app/dist/*.tar.gz ENTRYPOINT ["python", "-m", "langflow", "run"] -CMD ["--host", "0.0.0.0", "--port", "7860"] \ No newline at end of file +CMD ["--host", "0.0.0.0", "--port", "7860"]