Skip to content

Adding Docker support to git server.#68

Open
stnwlls wants to merge 3 commits intoopen-webui:mainfrom
stnwlls:main
Open

Adding Docker support to git server.#68
stnwlls wants to merge 3 commits intoopen-webui:mainfrom
stnwlls:main

Conversation

@stnwlls
Copy link

@stnwlls stnwlls commented Feb 3, 2026

Summary

This PR adds Docker support to the git server repo. I matched the other server's Dockerfile, minus a few tweaks to ensure git works.

Changes

  • Dockerfile: Added build process for the application.
  • compose.yml: Copied format from other servers.
  • .dockerignore: Also copied from other servers.

I didn't update the README.md, but I'm happy to if you'd like.

Testing Checklist

  • Dockerfile builds successfully without errors.
  • Application runs via docker-compose up.
  • tool tested via Open WebUI and http://:/docs

Copilot AI review requested due to automatic review settings February 3, 2026 22:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Docker support for the servers/git FastAPI service so it can be built and run consistently like the other servers in the repo.

Changes:

  • Updated servers/git/requirements.txt to include GitPython, matching the runtime dependency used in main.py.
  • Added a Dockerfile for the git server, including Git installation, non-root user, dependency installation, and an uvicorn entrypoint.
  • Added a minimal compose.yaml and a .dockerignore aligned with patterns used by other servers in this repository.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
servers/git/requirements.txt Adds GitPython to match the git usage in main.py, ensuring the app has its required dependency in the container.
servers/git/Dockerfile Defines a BuildKit-friendly Python 3.10 slim image with Git installed, installs requirements.txt, configures a non-root user, sets HOME for Git, and runs uvicorn main:app on port 8000.
servers/git/compose.yaml Provides a simple compose service definition for the git server, building from the local context and exposing port 8000:8000, consistent with other servers.
servers/git/.dockerignore Mirrors the ignore patterns used by other servers to keep the Docker build context lean and exclude repo metadata and docs from images.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +40 to +42
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
python -m pip install -r requirements.txt
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python -m pip install -r requirements.txt installs third-party dependencies from PyPI without any version pinning or integrity guarantees, so each build may pull arbitrary new code from mutable package versions. If an attacker compromises one of these packages or the package index, they can achieve code execution in the build and runtime environment of this git server. To reduce supply chain risk, pin all external dependencies in requirements.txt to specific versions (or hashes) and use a reproducible, trusted source for installing them.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a direct copy from the other examples in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant