Gemini Docker
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# Utiliser Node 20 slim
|
||||
FROM node:20-slim
|
||||
|
||||
|
||||
# Installer les dépendances nécessaires pour npm global + bash
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
ca-certificates \
|
||||
git \
|
||||
bash \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Installer gemini-cli globalement
|
||||
RUN npm install -g @google/gemini-cli
|
||||
|
||||
# Créer un répertoire de travail
|
||||
WORKDIR /app
|
||||
|
||||
# Par défaut on reste dans bash interactif
|
||||
CMD ["/bin/bash"]
|
||||
|
||||
18
README.md
Normal file
18
README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Add a .env File.
|
||||
|
||||
GEMINI_API_KEY=your_gemini_api_key_here
|
||||
|
||||
4. Start the Docker Container
|
||||
|
||||
docker compose up -d
|
||||
|
||||
|
||||
5. Enter the Container
|
||||
|
||||
docker compose exec gemini-cli-node /bin/bash
|
||||
|
||||
6. Start Using Gemini
|
||||
|
||||
Once inside the container shell, run:
|
||||
|
||||
gemini
|
||||
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "3.8"
|
||||
|
||||
|
||||
services:
|
||||
gemini-cli-node:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: gemini-cli-node
|
||||
volumes:
|
||||
- .:/app
|
||||
- gemini-config:/root/.config/gemini
|
||||
working_dir: /app
|
||||
stdin_open: true
|
||||
tty: true
|
||||
command: /bin/bash
|
||||
environment:
|
||||
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
||||
|
||||
volumes:
|
||||
gemini-config:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user