FROM python:3.11-slim RUN apt-get update && apt-get install -y --no-install-recommends \ openssh-client \ sshpass \ libssh-dev \ gcc \ && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir \ ansible-core \ ansible-pylibssh RUN ansible-galaxy collection install cisco.ios COPY playbooks/ansible.cfg /etc/ansible/ansible.cfg WORKDIR /project services: ansible: build: . volumes: - ./playbooks:/project/playbooks working_dir: /project/playbooks stdin_open: true tty: true pyats: image: ciscotestautomation/pyats:latest volumes: - ./testbed:/project/testbed working_dir: /project/testbed stdin_open: true tty: true services: ansible: build: . volumes: - ./playbooks:/project/playbooks working_dir: /project/playbooks environment: - ANSIBLE_NET_USERNAME=${DEVICE_USERNAME} - ANSIBLE_NET_PASSWORD=${DEVICE_PASSWORD} stdin_open: true tty: true pyats: image: ciscotestautomation/pyats:latest volumes: - ./testbed:/project/testbed working_dir: /project/testbed environment: - PYATS_USERNAME=${DEVICE_USERNAME} - PYATS_PASSWORD=${DEVICE_PASSWORD} healthcheck: test: ["CMD", "pyats", "version"] interval: 30s timeout: 10s retries: 3 stdin_open: true tty: true