diff --git a/docker/Dockerfile b/docker/Dockerfile index 7b2ad49..475f15e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,36 +2,4 @@ # Author: Arthur Cadore M. Barcella # Github: arthurcadore # Capacitação Redes - PV Intelbras -FROM ubuntu:22.04 - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get clean -RUN apt-get install -y \ - ansible \ - python3 \ - python3-pip \ - supervisor - -# Install additional dependencies for container -RUN pip3 install textfsm==1.1.0 \ - scp==0.15.0 \ - paramiko==3.4.0 \ - ncclient==0.6.15 \ - lxml==5.2.2 \ - ipaddr==2.2.0 \ - future==1.0.0 \ - PyNaCl==1.5.0 \ - bcrypt==4.1.3 \ - cffi==1.17.0rc1 \ - pycparser==2.22 - -# Add startup script to container: -COPY docker/startup.sh /usr/sbin/startup.sh -RUN chmod +x /usr/sbin/startup.sh - -# Add supervisord configuration file: -COPY docker/supervisor.conf /etc/supervisord.conf - - -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] \ No newline at end of file +FROM arthurcadore/ansible-comware:6.0 diff --git a/docker/startup.sh b/docker/startup.sh deleted file mode 100644 index a3d2047..0000000 --- a/docker/startup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Author: Arthur Cadore M. Barcella -# Github: arthurcadore - -echo "###################################################################" -echo "Booting the H3C comware library..." - -cd /ansible/ -python3 setup.py install - -echo "###################################################################" -echo "Execute playbooks script..." - -chmod +x /ansible/playbooks/playbooks.sh -/ansible/playbooks/playbooks.sh diff --git a/docker/supervisor.conf b/docker/supervisor.conf deleted file mode 100644 index 44520fe..0000000 --- a/docker/supervisor.conf +++ /dev/null @@ -1,13 +0,0 @@ -[supervisord] -nodaemon=true -user=root - -[program:ansible] -command=/bin/bash -c "/usr/sbin/startup.sh" -autorestart=false -startsecs=2 -priority=10 -stdout_logfile=/dev/stdout -stderr_logfile=/dev/stderr -stdout_logfile_maxbytes = 0 -stderr_logfile_maxbytes = 0 \ No newline at end of file