From 60752a77179f887e9d7a6919805b171a3d2125f9 Mon Sep 17 00:00:00 2001 From: Georgii Korshunov Date: Fri, 2 May 2025 20:51:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Adding=20Dockerfile=20&=20Docker?= =?UTF-8?q?=20usage=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +++++ README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3a167f9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.13-alpine + +RUN pip install terminalgpt + +ENTRYPOINT ["terminalgpt"] diff --git a/README.md b/README.md index 1fec44b..74aa6d2 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,22 @@ rm "$package_location" pipx install terminalgpt==2.2.7 --force ``` +### Using Docker + +1. Pull the image. + +```sh +docker pull adamyodinsky/terminalgpt +``` + +2. Use the image, mounting the configuration directory as a volume. + +```sh +docker run --rm -it -v $HOME/.terminalgpt:/root/.terminalgpt adamyodinsky/terminalgpt terminalgpt install +``` + +See [Recommended aliases](#recommended-aliases) for shell aliases that make the Docker commands shorter. + ### Setup 1. Now you have `terminalgpt` command available in your terminal. Run the following install command to configure the app. @@ -168,6 +184,16 @@ echo alias tgpto="terminalgpt one-shot" >> ~/.bashrc echo alias tgptn="terminalgpt new" >> ~/.bashrc ``` +### Docker + +Here's an example of Bash aliases for using the Docker image: + +```sh +echo alias tgpt="docker run --rm -it -v $HOME/.terminalgpt:/root/.terminalgpt adamyodinsky/terminalgpt" >> ~/.bashrc +echo alias tgpto="docker run --rm -it -v $HOME/.terminalgpt:/root/.terminalgpt adamyodinsky/terminalgpt one-shot" >> ~/.bashrc +echo alias tgptn="docker run --rm -it -v $HOME/.terminalgpt:/root/.terminalgpt adamyodinsky/terminalgpt new" >> ~/.bashrc +``` + --- [![Star History Chart](https://api.star-history.com/svg?repos=adamyodinsky/TerminalGPT&type=Date)](https://www.star-history.com/#adamyodinsky/TerminalGPT&Date)