diff --git a/DOCKER.md b/DOCKER.md new file mode 100644 index 0000000..a46a36d --- /dev/null +++ b/DOCKER.md @@ -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. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c142ab8 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..75d0efc --- /dev/null +++ b/docker-compose.yaml @@ -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"]