Spaces:
Runtime error
Runtime error
| FROM debian:bullseye-slim | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install required packages | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| ansible \ | |
| sshpass \ | |
| openssh-client \ | |
| sudo \ | |
| python3-pip \ | |
| curl \ | |
| nano \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create user and working directory with proper permissions | |
| RUN groupadd -g 1000 ansible && \ | |
| useradd -m -u 1000 -g ansible ansible && \ | |
| mkdir -p /ansible-nas && \ | |
| chown -R ansible:ansible /ansible-nas | |
| USER ansible | |
| WORKDIR /ansible-nas | |
| # Clone Ansible-NAS and set up environment | |
| RUN git clone https://github.com/davestephens/ansible-nas.git . && \ | |
| ansible-galaxy install -r requirements.yml | |
| # Default command — override as needed on HF | |
| CMD ["ansible-playbook", "-i", "inventories/my-ansible-nas/inventory", "nas.yml", "-b"] | |