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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # docker image with snmp and basic networking tools
  2. # Unpacking ManageEngine_MibBrowser_FreeTool_64bit.bin
  3. FROM ehlers/ipterm-base
  4. COPY ManageEngine_MibBrowser_FreeTool_64bit.bin /tmp/
  5. RUN set -e -x \
  6. && chmod +x /tmp/ManageEngine_MibBrowser_FreeTool_64bit.bin \
  7. && /tmp/ManageEngine_MibBrowser_FreeTool_64bit.bin -silent
  8. # Main image
  9. FROM ehlers/ipterm-base
  10. COPY --from=0 /root/ManageEngine/ManageEngine_Free_Tools/MibBrowser_Free_Tool /opt/MibBrowser
  11. RUN set -e -x \
  12. #
  13. # install snmp cli tools
  14. #
  15. && export DEBIAN_FRONTEND=noninteractive \
  16. && sed -i -e '/^deb / s/$/ non-free/' /etc/apt/sources.list \
  17. && apt-get update \
  18. && apt-get -y --no-install-recommends install \
  19. snmp snmp-mibs-downloader libxtst6 \
  20. dillo ca-certificates lxterminal jwm menu mousepad \
  21. && rm -rf /var/lib/apt/lists/* \
  22. && sed -i -e 's/^mibs/#mibs/' /etc/snmp/snmp.conf \
  23. #
  24. # some fixups
  25. #
  26. && ln -s /usr/bin/dillo /usr/local/bin/firefox \
  27. && mv /opt/MibBrowser/MibBrowserlogo.jpg /opt/MibBrowser/MibBrowserlogo.JPG \
  28. && curl -s -S -L -o /var/lib/snmp/mibs/ietf/RFC1271-MIB https://www.simpleweb.org/ietf/mibs/modules/IETF/txt/RFC1271-MIB \
  29. #
  30. # customize jwm menu
  31. #
  32. && printf '\
  33. ?package(local.mibbrowser):\\\n\
  34. needs="x11"\\\n\
  35. section="Applications"\\\n\
  36. title="MIB Browser"\\\n\
  37. command="MibBrowser"\n' \
  38. > /etc/menu/qtmib \
  39. && printf '\
  40. ?package(mousepad):\\\n\
  41. needs="x11"\\\n\
  42. section="Applications/TextEditor"\\\n\
  43. title="Mousepad"\\\n\
  44. command="mousepad"\n' \
  45. > /etc/menu/mousepad \
  46. && echo "postrun=\"sed -i '/^ </ d' debian-menu\"" >> /etc/menu-methods/jwm \
  47. && sed -i 's/\(Desktops width\)="[0-9]*"/\1="2"/' /etc/jwm/system.jwmrc \
  48. && sed -i 's/xterm/x-terminal-emulator/g' /etc/jwm/system.jwmrc \
  49. && update-menus \
  50. #
  51. # set lxterminal defaults
  52. #
  53. && mkdir -p /root/.config/lxterminal \
  54. && printf '\
  55. [general]\n\
  56. scrollback=1000\n\
  57. fgcolor=#ffffff\n' \
  58. > /root/.config/lxterminal/lxterminal.conf \
  59. #
  60. # MibBrowser start script
  61. #
  62. && printf '\
  63. \043!/bin/sh\n\
  64. \n\
  65. MB_HOME=/opt/MibBrowser\n\
  66. JAVA_HOME=$MB_HOME/jre\n\
  67. export JAVA_HOME\n\
  68. \n\
  69. cd\n\
  70. mkdir -p MibBrowser\n\
  71. cd MibBrowser\n\
  72. [ -e Templates ] || ln -s "$MB_HOME/Templates" .\n\
  73. [ -e conf ] || cp -a "$MB_HOME/conf" .\n\
  74. [ -e help ] || ln -s "$MB_HOME/help" .\n\
  75. [ -e mibs ] || ln -s "$MB_HOME/mibs" .\n\
  76. [ -e std_mibs ] || ln -s /var/lib/snmp/mibs std_mibs\n\
  77. \n\
  78. 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\
  79. \n\
  80. export CLASSPATH\n\
  81. \n\
  82. "$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' \
  83. > /usr/local/bin/MibBrowser && chmod +x /usr/local/bin/MibBrowser \
  84. #
  85. # startup script
  86. #
  87. && printf '\
  88. \043!/bin/sh\n\
  89. [ $$ -eq 1 ] && exec dumb-init -- "$0" "$@"\n\
  90. \n\
  91. \043 workaround: sometimes the first start of an X application fails\n\
  92. lxterminal -e true 2> /dev/null\n\
  93. \n\
  94. cd\n\
  95. export SHELL=/bin/bash\n\
  96. MibBrowser &\n\
  97. jwm\n' \
  98. > /etc/init.sh && chmod +x /etc/init.sh
  99. VOLUME [ "/root" ]
  100. CMD [ "/etc/init.sh" ]