1. Persistence Setup: Optimized the dockerfile to manually create the /root/.config/conn/.folder file

pointing to /config. This avoids running the conn command during the build process and ensures a
      cleaner setup.
   2. Copilot UI Fix: Resolved a double-escaping bug in the terminal bottom bar. Device prompts (like
      6WIND-PE1>) will now render correctly instead of showing HTML entities like >.
   3. AI Model Update: Updated the default engineer model in connpy/ai.py to
      gemini/gemini-3.1-flash-lite, removing the deprecated -preview suffix.
   4. Standardized Timeouts: Unified all default timeouts to 20 seconds across the board. This includes
      direct execution (run/test), modern playbooks (v2), and classic task-based playbooks (v1).
   5. Documentation Update: Regenerated the full documentation site in the docs/ directory using pdoc to
      reflect the latest changes.
   6. Cleanup: Removed all debug prints from connpy/core.py and restored the docker/logs/.gitignore
      file.
This commit is contained in:
2026-05-13 14:16:14 -03:00
parent 3ad4f6da1f
commit 12543c683e
87 changed files with 6715 additions and 2552 deletions
+58 -14
View File
@@ -1,21 +1,65 @@
# Use the official python image
# connpy v6.0.0b8 - Modern Network Automation Environment (Local Build)
FROM python:3.11-slim
FROM python:3.11-alpine as connpy-app
LABEL description="Connpy: AI-Driven Network Automation & Intelligence Platform"
# Configuración de Terminal y Python
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
TERM=xterm-256color
# Set the entrypoint
# Set the working directory
WORKDIR /app
# Install any additional dependencies
RUN apk update && apk add --no-cache openssh fzf fzf-tmux ncurses bash
RUN pip3 install connpy
RUN connpy config --configfolder /app
# 1. Herramientas base del sistema
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
openssh-client \
fzf \
ncurses-bin \
bash \
procps \
unzip \
ca-certificates \
gnupg \
iputils-ping \
telnet \
&& rm -rf /var/lib/apt/lists/*
#AUTH
RUN ssh-keygen -A
RUN mkdir /root/.ssh && \
chmod 700 /root/.ssh
# 2. Instalar Docker CLI (para el plugin de docker de connpy)
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && apt-get install -y docker-ce-cli && \
rm -rf /var/lib/apt/lists/*
# 3. Instalar Kubectl (para el plugin de k8s de connpy)
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
rm kubectl
#Set the entrypoint
ENTRYPOINT ["connpy"]
# 4. Instalar AWS CLI y Session Manager Plugin (Universal x86_64/ARM64)
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then AWS_ARCH="x86_64"; else AWS_ARCH="aarch64"; fi && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-$AWS_ARCH.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip aws/ && \
if [ "$ARCH" = "x86_64" ]; then \
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "ssm.deb"; \
else \
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_arm64/session-manager-plugin.deb" -o "ssm.deb"; \
fi && \
dpkg -i ssm.deb && rm ssm.deb
# 5. Copiar código local e instalar dependencias
COPY . .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir .
# 6. Configuración de persistencia
# Creamos la carpeta y el puntero .folder para que connpy use /config
RUN mkdir -p /config /root/.ssh /root/.config/conn && chmod 700 /root/.ssh && \
echo -n "/config" > /root/.config/conn/.folder
# Punto de entrada directo a connpy
ENTRYPOINT ["conn"]