Initial commit
This commit is contained in:
23
ansible-controller/Dockerfile
Normal file
23
ansible-controller/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip openssh-client vim git \
|
||||
ansible && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /ansible
|
||||
|
||||
RUN useradd -ms /bin/bash uansible
|
||||
USER uansible
|
||||
WORKDIR /home/uansible
|
||||
|
||||
RUN mkdir -p /home/uansible/.ssh && \
|
||||
chmod 700 /home/uansible/.ssh && \
|
||||
echo export ANSIBLE_CONFIG=/ansible/ansible.cfg>>~/.bashrc && \
|
||||
echo cd /ansible>>~/.bashrc
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "-lc"]
|
||||
CMD ["bash"]
|
||||
Reference in New Issue
Block a user