Spaces:
Paused
Paused
File size: 848 Bytes
ca6a967 f685895 ca6a967 f685895 ca6a967 f685895 ca6a967 f685895 ca6a967 f685895 ca6a967 f685895 ca6a967 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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"]
|