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 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # docker image with snmp and basic networking tools
  2. FROM ehlers/ipterm-base
  3. ADD ManageEngine_MibBrowser_FreeTool_64bit.tar.gz /opt/MibBrowser/
  4. RUN set -e -x \
  5. #
  6. # install snmp cli tools
  7. #
  8. && export DEBIAN_FRONTEND=noninteractive \
  9. && sed -i -e '/^deb / s/$/ non-free/' /etc/apt/sources.list \
  10. && apt-get update \
  11. && apt-get -y --no-install-recommends install \
  12. snmp snmp-mibs-downloader libxtst6 dillo lxterminal jwm menu leafpad \
  13. && rm -rf /var/lib/apt/lists/* \
  14. && sed -i -e 's/^mibs/#mibs/' /etc/snmp/snmp.conf \
  15. #
  16. # some fixups
  17. #
  18. && ln -s /usr/bin/dillo /usr/local/bin/firefox \
  19. && mv /opt/MibBrowser/MibBrowserlogo.jpg /opt/MibBrowser/MibBrowserlogo.JPG \
  20. && curl -s -S -L -o /var/lib/snmp/mibs/ietf/RFC1271-MIB https://www.simpleweb.org/ietf/mibs/modules/IETF/txt/RFC1271-MIB \
  21. #
  22. # customize jwm menu
  23. #
  24. && printf '\
  25. ?package(local.mibbrowser):\\\n\
  26. needs="x11"\\\n\
  27. section="Applications"\\\n\
  28. title="MIB Browser"\\\n\
  29. command="MibBrowser"\n' \
  30. > /etc/menu/qtmib \
  31. && echo "postrun=\"sed -i '/^ </ d' debian-menu\"" >> /etc/menu-methods/jwm \
  32. && sed -i 's/\(Desktops width\)="[0-9]*"/\1="2"/' /etc/jwm/system.jwmrc \
  33. && sed -i 's/xterm/x-terminal-emulator/g' /etc/jwm/system.jwmrc \
  34. && update-menus \
  35. #
  36. # set lxterminal defaults
  37. #
  38. && mkdir -p /root/.config/lxterminal \
  39. && printf '\
  40. [general]\n\
  41. scrollback=1000\n\
  42. fgcolor=#ffffff\n' \
  43. > /root/.config/lxterminal/lxterminal.conf \
  44. #
  45. # MibBrowser start script
  46. #
  47. && printf '\
  48. \043!/bin/sh\n\
  49. \n\
  50. MB_HOME=/opt/MibBrowser\n\
  51. JAVA_HOME=$MB_HOME/jre\n\
  52. export JAVA_HOME\n\
  53. \n\
  54. cd\n\
  55. mkdir -p MibBrowser\n\
  56. cd MibBrowser\n\
  57. [ -e Templates ] || ln -s "$MB_HOME/Templates" .\n\
  58. [ -e conf ] || cp -a "$MB_HOME/conf" .\n\
  59. [ -e help ] || ln -s "$MB_HOME/help" .\n\
  60. [ -e mibs ] || ln -s "$MB_HOME/mibs" .\n\
  61. [ -e std_mibs ] || ln -s /var/lib/snmp/mibs std_mibs\n\
  62. \n\
  63. CLASSPATH=$MB_HOME/classes:$MB_HOME/conf:$MB_HOME/MibBrowser:$MB_HOME/jars/ApiUtils.jar:$MB_HOME/jars/AdventNetSnmp.jar:$MB_HOME/jars/AdventNetLogging.jar:$MB_HOME/jars/AdventNetCCLXMLParser.jar:$MB_HOME/jars/AdventNetUtils.jar:$MB_HOME/jars/AdventNetCCLUtils.jar:$MB_HOME/jars/AdventNetSnmpUtilitiesSplash.jar:$MB_HOME/jars/MibBrowser.jar:$MB_HOME:$MB_HOME/jars/JimiProClasses.zip:$MB_HOME/jars/AdventNetNPrevalent.jar:$MB_HOME/jars/AdventNetUI.jar:$MB_HOME/jars/Mail.jar:$MB_HOME/jars/activation.jar:$MB_HOME/jars/AdventNetScript.jar:$MB_HOME/jars/jython.jar:$MB_HOME/jars/log4j-1.2.16.jar:$MB_HOME/jars/smslib-3.5.3.jar\n\
  64. \n\
  65. export CLASSPATH\n\
  66. \n\
  67. "$JAVA_HOME/bin/java" -mx200M MibBrowserApplication -h localhost -p 161 -v v1 -c public -m "$MB_HOME/mibs/RFC1213-MIB $MB_HOME/mibs/IF-MIB" -t 5 -r 0\n' \
  68. > /usr/local/bin/MibBrowser && chmod +x /usr/local/bin/MibBrowser \
  69. #
  70. # startup script
  71. #
  72. && printf '\
  73. \043!/bin/sh\n\
  74. [ $$ -eq 1 ] && exec dumb-init -- "$0" "$@"\n\
  75. \n\
  76. \043 workaround: sometimes the first start of an X application fails\n\
  77. lxterminal -e true 2> /dev/null\n\
  78. \n\
  79. cd\n\
  80. export SHELL=/bin/bash\n\
  81. MibBrowser &\n\
  82. jwm\n' \
  83. > /etc/init.sh && chmod +x /etc/init.sh
  84. VOLUME [ "/root" ]
  85. CMD [ "/etc/init.sh" ]