Update Dockerfiles to include user creation and use --user flag for pip install
This commit is contained in:
parent
704da1d4de
commit
5d75d930bd
2 changed files with 8 additions and 6 deletions
|
|
@ -74,10 +74,11 @@ RUN $POETRY_HOME/bin/poetry build
|
|||
FROM python-base as final
|
||||
|
||||
# Copy virtual environment and built .tar.gz from builder base
|
||||
RUN useradd -m -u 1000 user
|
||||
COPY --from=builder-base /app/dist/*.tar.gz ./
|
||||
|
||||
# Install the package from the .tar.gz
|
||||
RUN pip install *.tar.gz
|
||||
RUN python -m pip install *.tar.gz --user
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
ENTRYPOINT ["python", "-m", "langflow", "run"]
|
||||
CMD ["--host", "0.0.0.0", "--port", "7860"]
|
||||
|
|
@ -82,10 +82,11 @@ RUN cd src/backend/base && $POETRY_HOME/bin/poetry build --format sdist
|
|||
FROM python-base as final
|
||||
|
||||
# Copy virtual environment and built .tar.gz from builder base
|
||||
RUN useradd -m -u 1000 user
|
||||
COPY --from=builder-base /app/src/backend/base/dist/*.tar.gz ./
|
||||
|
||||
# Install the package from the .tar.gz
|
||||
RUN pip install *.tar.gz
|
||||
RUN pip install *.tar.gz --user
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
ENTRYPOINT ["python", "-m", "langflow", "run"]
|
||||
CMD ["--host", "0.0.0.0", "--port", "7860"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue