openwebui-oikb/Dockerfile
Timothy Jaeryang Baek f99d2e66e7
Some checks failed
Docker (GHCR) / read-version (push) Has been cancelled
Docker (GHCR) / build-dev (amd64, Dockerfile, default, linux/amd64, ubuntu-latest) (push) Has been cancelled
Docker (GHCR) / build-dev (amd64, Dockerfile.alpine, alpine, linux/amd64, ubuntu-latest) (push) Has been cancelled
Docker (GHCR) / build-dev (arm64, Dockerfile, default, linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Docker (GHCR) / build-dev (arm64, Dockerfile.alpine, alpine, linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Docker (GHCR) / merge-dev (push) Has been cancelled
Docker (GHCR) / merge-dev-alpine (push) Has been cancelled
Docker (GHCR) / build-release (amd64, Dockerfile, default, linux/amd64, ubuntu-latest) (push) Has been cancelled
Docker (GHCR) / build-release (amd64, Dockerfile.alpine, alpine, linux/amd64, ubuntu-latest) (push) Has been cancelled
Docker (GHCR) / build-release (arm64, Dockerfile, default, linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Docker (GHCR) / build-release (arm64, Dockerfile.alpine, alpine, linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Docker (GHCR) / merge-release (push) Has been cancelled
Docker (GHCR) / merge-release-alpine (push) Has been cancelled
refac
2026-07-17 16:16:41 -04:00

43 lines
1.2 KiB
Docker

FROM python:3.11-slim-bookworm AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_LINK_MODE=copy
WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --extra all --no-install-project --no-dev
COPY pyproject.toml LICENSE README.md ./
COPY src/ ./src/
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --extra all --no-dev
FROM python:3.11-slim-bookworm
LABEL org.opencontainers.image.description="CLI tool for syncing content to Open WebUI Knowledge Bases" \
org.opencontainers.image.source="https://github.com/open-webui/oikb" \
org.opencontainers.image.vendor="Open WebUI Inc." \
org.opencontainers.image.licenses="MIT"
ENV PYTHONUNBUFFERED=1
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --gid 1000 appuser \
&& useradd --uid 1000 --gid appuser --create-home --shell /usr/sbin/nologin appuser
COPY --from=builder --chown=appuser:appuser /app /app
WORKDIR /app
USER appuser
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 8080
ENTRYPOINT ["oikb"]