Merge pull request #17 from adorosario/main

Added localized dockerized build instructions with documentation
This commit is contained in:
Kirill Markin 2024-12-16 00:57:49 +01:00 committed by GitHub
commit 9b03465644
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 0 deletions

27
DOCKER.md Normal file
View file

@ -0,0 +1,27 @@
# Docker Usage Instructions
## Building and Running
1. Build the container:
```bash
docker-compose build
```
2. Start a shell session:
```bash
docker-compose run --rm repo-to-text
```
Once in the shell, you can run repo-to-text:
```bash
# Process current directory
repo-to-text
# Process specific directory
repo-to-text /home/user/myproject
# Use with options
repo-to-text --output-dir /home/user/output
```
The container mounts your home directory at `/home/user`, allowing access to all your projects.

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
tree \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -s /bin/bash user
WORKDIR /app
COPY . .
RUN pip install -e . && pip install pyperclip
ENTRYPOINT ["repo-to-text"]

10
docker-compose.yaml Normal file
View file

@ -0,0 +1,10 @@
services:
repo-to-text:
build: .
volumes:
- ${HOME:-/home/user}:/home/user
working_dir: /home/user
environment:
- HOME=/home/user
user: "${UID:-1000}:${GID:-1000}"
entrypoint: ["/bin/bash"]