Update Dockerfiles to create langflow directory and grant write permissions (#1996)
This pull request updates the Dockerfiles to create a "langflow" directory and grant write permissions to it. This change ensures that the user inside the Docker container has the necessary permissions to write to the "langflow" directory.
This commit is contained in:
commit
3f5769dd79
2 changed files with 11 additions and 6 deletions
|
|
@ -77,11 +77,13 @@ RUN $POETRY_HOME/bin/poetry lock
|
|||
RUN $POETRY_HOME/bin/poetry build
|
||||
|
||||
# Copy virtual environment and built .tar.gz from builder base
|
||||
RUN useradd -m -u 1000 user
|
||||
RUN chown -R user:user /app
|
||||
RUN useradd -m -u 1000 user && \
|
||||
mkdir -p /app/langflow && \
|
||||
chown -R user:user /app \
|
||||
chmod -R u+w /app/langflow
|
||||
USER user
|
||||
# Install the package from the .tar.gz
|
||||
RUN python -m pip install /app/dist/*.tar.gz
|
||||
RUN python -m pip install /app/dist/*.tar.gz --user
|
||||
|
||||
ENTRYPOINT ["python", "-m", "langflow", "run"]
|
||||
CMD ["--host", "0.0.0.0", "--port", "7860"]
|
||||
|
|
|
|||
|
|
@ -81,11 +81,14 @@ RUN rm -rf src/backend/base/dist
|
|||
RUN cd src/backend/base && $POETRY_HOME/bin/poetry build
|
||||
|
||||
# Copy virtual environment and built .tar.gz from builder base
|
||||
RUN useradd -m -u 1000 user
|
||||
RUN chown -R user:user /app
|
||||
RUN useradd -m -u 1000 user && \
|
||||
mkdir -p /app/langflow && \
|
||||
chown -R user:user /app \
|
||||
chmod -R u+w /app/langflow
|
||||
|
||||
USER user
|
||||
# Install the package from the .tar.gz
|
||||
RUN python -m pip install /app/src/backend/base/dist/*.tar.gz
|
||||
RUN python -m pip install /app/src/backend/base/dist/*.tar.gz --user
|
||||
|
||||
|
||||
ENTRYPOINT ["python", "-m", "langflow", "run"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue