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 973B

12345678910111213141516171819202122232425262728293031323334353637
  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 --no-cache add busybox-extras dumb-init \
  8. && mkdir -p /usr/local/sbin \
  9. && url=$(wget -q -O - https://git.bernhard-ehlers.de/api/v1/repos/ehlers/nodnsd/releases | sed -n 's/^.*"browser_download_url": *"\([^"]*\).*/\1/p') \
  10. && if [ -z "$url" ]; then echo "nodnsd package not found" >&2; exit 1; fi \
  11. && wget -q -O /usr/local/sbin/nodnsd "$url" \
  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\n\
  31. fi\n' \
  32. > /etc/init.sh && chmod +x /etc/init.sh
  33. ENTRYPOINT [ "/etc/init.sh" ]
  34. VOLUME [ "/root", "/home/gns3" ]