Dockerfile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. FROM debian:bookworm AS builder
  2. ENV WCURL_VERSION=2024.07.10
  3. ENV MTOOLS_VERSION=v3.0
  4. ENV SCAMPER_VERSION=20240725
  5. # build & install wcurl
  6. RUN set -e -x \
  7. && export DEBIAN_FRONTEND=noninteractive \
  8. && apt-get update \
  9. && apt-get --yes install git \
  10. && cd /root \
  11. && git clone --depth 1 --branch "$WCURL_VERSION" https://github.com/Debian/wcurl.git \
  12. && cd wcurl \
  13. && install -Dm755 wcurl /usr/local/bin/wcurl \
  14. && install -Dm755 wcurl.1 /usr/local/share/man/man1/wcurl.1
  15. # build & install mtools
  16. RUN set -e -x \
  17. && export DEBIAN_FRONTEND=noninteractive \
  18. && apt-get update \
  19. && apt-get --yes install build-essential git \
  20. && cd /root \
  21. && git clone --depth 1 --branch "$MTOOLS_VERSION" https://github.com/troglobit/mtools.git \
  22. && cd mtools \
  23. && make all \
  24. && make install
  25. # build & install scamper
  26. RUN set -e -x \
  27. && export DEBIAN_FRONTEND=noninteractive \
  28. && apt-get update \
  29. && apt-get --yes install build-essential curl \
  30. && cd /root \
  31. && wcurl "https://www.caida.org/catalog/software/scamper/code/scamper-cvs-$SCAMPER_VERSION.tar.gz" \
  32. && tar xfz "scamper-cvs-$SCAMPER_VERSION.tar.gz" \
  33. && cd "scamper-cvs-$SCAMPER_VERSION/" \
  34. && ./configure \
  35. && make \
  36. && make install
  37. FROM debian:bookworm
  38. COPY --from=builder /usr/local/bin/ /usr/local/bin/
  39. COPY --from=builder /usr/local/sbin/ /usr/local/bin/
  40. COPY --from=builder /usr/local/share/ /usr/local/share/
  41. # Install tools
  42. RUN set -e -x \
  43. && export DEBIAN_FRONTEND=noninteractive \
  44. && apt-get update \
  45. && apt-get --yes install mtr iputils-tracepath iputils-ping iputils-clockdiff iputils-arping traceroute socat nmap nmap-common ncat netcat-openbsd tcpdump bind9-dnsutils ldnsutils curl wget openssh-client tshark iperf3 fping python3 python3-scapy iproute2 ifupdown net-tools vim telnet man htop
  46. # Prepare system
  47. RUN set -e -x \
  48. && export DEBIAN_FRONTEND=noninteractive \
  49. && apt-get update \
  50. && apt-get --yes install dumb-init
  51. # Create entrypoint
  52. ADD init.sh /etc/init.sh
  53. RUN chmod +x /etc/init.sh
  54. ENTRYPOINT [ "/etc/init.sh" ]
  55. VOLUME [ "/root" ]
  56. # Properties
  57. LABEL org.opencontainers.image.title="ipterm-enhanced"
  58. LABEL org.opencontainers.image.description="Fork from gns3/ipterm with additional tools like wcurl, scamper, iputils, mtr, nmap, netcat, scapy and a few others."
  59. LABEL org.opencontainers.image.source="https://codeberg.org/mark22k/ipterm-enhanced/"
  60. LABEL org.opencontainers.image.authors="Marek Küthe <m.k@mk16.de>, GNS3 Team"