# Matrix Ansible Controller # Portable container for managing matrix-docker-ansible-deploy playbook FROM python:3.12-alpine LABEL maintainer="maddox" LABEL description="Portable Ansible controller for matrix-docker-ansible-deploy" # Install system dependencies RUN apk add --no-cache \ git \ openssh-client \ bash \ curl \ rsync \ gcc \ musl-dev \ libffi-dev \ openssl-dev \ python3-dev \ just \ nano \ vim \ tmux \ jq # Install Ansible and required Python packages RUN pip install --no-cache-dir \ ansible>=2.17.0 \ passlib \ dnspython \ netaddr \ jmespath \ docker \ requests # Create working directories RUN mkdir -p /playbook /inventory /ssh # Set up SSH directory with proper permissions RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh # Copy entrypoint script COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # Set working directory to playbook WORKDIR /playbook # Default environment ENV ANSIBLE_HOST_KEY_CHECKING=False ENV ANSIBLE_FORCE_COLOR=True ENV TERM=xterm-256color ENTRYPOINT ["/entrypoint.sh"] CMD ["/bin/bash"]