build(Dockerfile): update base image to python:3.10-slim

feat(Dockerfile): add gcc, g++, git, and make to apt-get install
feat(Dockerfile): add user and set environment variables
feat(Dockerfile): add WORKDIR and COPY
feat(Dockerfile): update langflow to version 0.0.71
feat(Dockerfile): add --port flag to CMD
This commit is contained in:
Gabriel Almeida 2023-05-16 11:46:55 -03:00
commit a4158b0cb5
2 changed files with 12 additions and 19 deletions

View file

@ -1,14 +0,0 @@
FROM python:3.10-slim
RUN apt-get update && apt-get install gcc g++ git make -y
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
RUN pip install langflow>==0.0.71 -U --user
CMD ["langflow", "--host", "0.0.0.0", "--port", "7860"]

View file

@ -1,7 +1,14 @@
FROM python:3.11-slim
FROM python:3.10-slim
RUN apt-get update && apt-get install gcc -y
RUN pip install langflow>=0.0.33
RUN apt-get update && apt-get install gcc g++ git make -y
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
EXPOSE 7860
CMD ["langflow", "--host", "0.0.0.0"]
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
RUN pip install langflow>==0.0.71 -U --user
CMD ["langflow", "--host", "0.0.0.0", "--port", "7860"]