GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # docker image with Ansible and basic networking tools
  2. FROM ehlers/ipterm-base
  3. RUN set -e -x \
  4. #
  5. # install ansible
  6. #
  7. && export DEBIAN_FRONTEND=noninteractive \
  8. && echo "deb [trusted=yes] http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" > /etc/apt/sources.list.d/ansible.list \
  9. && apt-get update \
  10. && apt-get -y --no-install-recommends install \
  11. ansible \
  12. #
  13. # install dependencies for junos network modules
  14. #
  15. && apt-get -y --no-install-recommends install \
  16. python-lxml python-netaddr python-scp python-serial \
  17. && apt-get -y --no-install-recommends install \
  18. python-pip python-wheel \
  19. && pip install --no-cache-dir ncclient jxmlease junos-eznc \
  20. && apt-get autoremove -y --purge python-pip python-wheel \
  21. && rm -rf /var/lib/apt/lists/* \
  22. #
  23. # startup script
  24. #
  25. && printf '\
  26. \043!/bin/sh\n\
  27. \n\
  28. \043 symlink /etc/hosts to persistent directory\n\
  29. mount | fgrep -q "on /etc/hosts "\n\
  30. if [ $? -ne 0 ]; then\n\
  31. [ -s /etc/ansible/etc_hosts ] || cp -p /etc/hosts /etc/ansible/etc_hosts\n\
  32. ln -sf /etc/ansible/etc_hosts /etc/hosts\n\
  33. fi\n\
  34. \n\
  35. cd; exec bash -i\n' \
  36. > /etc/init.sh && chmod +x /etc/init.sh
  37. VOLUME [ "/root", "/etc/ansible" ]
  38. CMD [ "/etc/init.sh" ]