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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 dillo lxterminal jwm menu leafpad \
  20. && rm -rf /var/lib/apt/lists/* \
  21. && sed -i -e 's/^mibs/#mibs/' /etc/snmp/snmp.conf \
  22. #
  23. # some fixups
  24. #
  25. && ln -s /usr/bin/dillo /usr/local/bin/firefox \
  26. && mv /opt/MibBrowser/MibBrowserlogo.jpg /opt/MibBrowser/MibBrowserlogo.JPG \
  27. && curl -s -S -L -o /var/lib/snmp/mibs/ietf/RFC1271-MIB https://www.simpleweb.org/ietf/mibs/modules/IETF/txt/RFC1271-MIB \
  28. #
  29. # customize jwm menu
  30. #
  31. && printf '\
  32. ?package(local.mibbrowser):\\\n\
  33. needs="x11"\\\n\
  34. section="Applications"\\\n\
  35. title="MIB Browser"\\\n\
  36. command="MibBrowser"\n' \
  37. > /etc/menu/qtmib \
  38. && echo "postrun=\"sed -i '/^ </ d' debian-menu\"" >> /etc/menu-methods/jwm \
  39. && sed -i 's/\(Desktops width\)="[0-9]*"/\1="2"/' /etc/jwm/system.jwmrc \
  40. && sed -i 's/xterm/x-terminal-emulator/g' /etc/jwm/system.jwmrc \
  41. && update-menus \
  42. #
  43. # set lxterminal defaults
  44. #
  45. && mkdir -p /root/.config/lxterminal \
  46. && printf '\
  47. [general]\n\
  48. scrollback=1000\n\
  49. fgcolor=#ffffff\n' \
  50. > /root/.config/lxterminal/lxterminal.conf \
  51. #
  52. # MibBrowser start script
  53. #
  54. && printf '\
  55. \043!/bin/sh\n\
  56. \n\
  57. MB_HOME=/opt/MibBrowser\n\
  58. JAVA_HOME=$MB_HOME/jre\n\
  59. export JAVA_HOME\n\
  60. \n\
  61. cd\n\
  62. mkdir -p MibBrowser\n\
  63. cd MibBrowser\n\
  64. [ -e Templates ] || ln -s "$MB_HOME/Templates" .\n\
  65. [ -e conf ] || cp -a "$MB_HOME/conf" .\n\
  66. [ -e help ] || ln -s "$MB_HOME/help" .\n\
  67. [ -e mibs ] || ln -s "$MB_HOME/mibs" .\n\
  68. [ -e std_mibs ] || ln -s /var/lib/snmp/mibs std_mibs\n\
  69. \n\
  70. 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\
  71. \n\
  72. export CLASSPATH\n\
  73. \n\
  74. "$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' \
  75. > /usr/local/bin/MibBrowser && chmod +x /usr/local/bin/MibBrowser \
  76. #
  77. # startup script
  78. #
  79. && printf '\
  80. \043!/bin/sh\n\
  81. [ $$ -eq 1 ] && exec dumb-init -- "$0" "$@"\n\
  82. \n\
  83. \043 workaround: sometimes the first start of an X application fails\n\
  84. lxterminal -e true 2> /dev/null\n\
  85. \n\
  86. cd\n\
  87. export SHELL=/bin/bash\n\
  88. MibBrowser &\n\
  89. jwm\n' \
  90. > /etc/init.sh && chmod +x /etc/init.sh
  91. VOLUME [ "/root" ]
  92. CMD [ "/etc/init.sh" ]