langflow/docker/dev.Dockerfile
Gabriel Luiz Freitas Almeida 8ea4405010
refactor: run upgrade in dockerfiles to update dependencies (#5508)
chore: Update Dockerfiles to use COPY instead of ADD run apt-get upgrade

- Replaced ADD commands with COPY for better clarity and consistency across Dockerfiles.
- Added apt-get upgrade and clean commands to reduce image size and ensure packages are up to date.
- Updated user creation commands to include necessary cleanup steps.
- Ensured all Dockerfiles follow a similar structure for maintainability.
2025-01-02 15:49:41 +00:00

30 lines
918 B
Docker

FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
ENV TZ=UTC
WORKDIR /app
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
build-essential \
curl \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . /app
# Install dependencies using uv
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=README.md,target=README.md \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,source=src/backend/base/README.md,target=src/backend/base/README.md \
--mount=type=bind,source=src/backend/base/uv.lock,target=src/backend/base/uv.lock \
--mount=type=bind,source=src/backend/base/pyproject.toml,target=src/backend/base/pyproject.toml \
uv sync --frozen --no-install-project --no-dev
EXPOSE 7860
EXPOSE 3000
CMD ["./docker/dev.start.sh"]