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.
 
 
 
 
 

38 lines
861 B

  1. # nicer alpine image
  2. FROM alpine
  3. RUN set -e -x -o pipefail \
  4. #
  5. # install busybox-extras, dumb-init and nodnsd
  6. #
  7. && apk upgrade \
  8. && apk add busybox-extras dumb-init \
  9. && rm -rf /var/cache/apk/* \
  10. && mkdir -p /usr/local/sbin \
  11. && wget -q -O /usr/local/sbin/nodnsd https://git.b-ehlers.de/ehlers/nodnsd/releases/download/v0.1/nodnsd_linux_amd64.bin \
  12. && chmod 755 /usr/local/sbin/nodnsd \
  13. #
  14. # add gns3 user
  15. #
  16. && printf 'gns3\ngns3\n' | adduser gns3 \
  17. #
  18. # startup script
  19. #
  20. && printf '\
  21. \043!/bin/sh\n\
  22. [ $$ -eq 1 ] && exec dumb-init -r 15:1 -- "$0" "$@"\n\
  23. \n\
  24. nodnsd\n\
  25. [ -f /root/init.sh ] && [ -x /root/init.sh ] && /root/init.sh\n\
  26. \n\
  27. if [ $# -gt 0 ]; then\n\
  28. exec "$@"\n\
  29. else\n\
  30. cd; exec ash -i -l\n\
  31. fi\n' \
  32. > /etc/init.sh && chmod +x /etc/init.sh
  33. ENTRYPOINT [ "/etc/init.sh" ]
  34. VOLUME [ "/root", "/home/gns3" ]