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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. FROM alpine
  2. #
  3. # install iouyap, tini and development tools to run PyInstaller
  4. #
  5. RUN set -e -x -o pipefail \
  6. && printf '\0\0\0\0' > /etc/hostid \
  7. && apk --no-cache add iouyap tini \
  8. && apk --no-cache add --virtual build-deps python3-dev zlib-dev gcc musl-dev wget ca-certificates \
  9. && cd /tmp \
  10. #
  11. # better ldd, show correct path for ld-musl library
  12. #
  13. && rm /usr/bin/ldd \
  14. && printf '\
  15. \043!/bin/sh\n\
  16. exec /lib/ld-musl-* --list -- "$@"\n' \
  17. > /usr/bin/ldd \
  18. && chmod +x /usr/bin/ldd \
  19. #
  20. # install PyInstaller
  21. # based on https://github.com/six8/pyinstaller-alpine
  22. #
  23. && tag=$(wget -q -O - https://api.github.com/repos/pyinstaller/pyinstaller/releases/latest | sed -n 's/^ *"tag_name": "\([^"]*\).*/\1/p') \
  24. && wget -q -O - https://github.com/pyinstaller/pyinstaller/archive/${tag}.tar.gz | tar xz \
  25. && cd pyinstaller*/bootloader \
  26. && CFLAGS="-Wno-stringop-overflow" python3 ./waf configure --no-lsb all \
  27. && cd .. \
  28. && pip3 install --no-cache-dir . \
  29. && cd .. \
  30. && rm -rf pyinstaller* \
  31. #
  32. # freeze iou_import, iou_export
  33. #
  34. && wget -q https://git.bernhard-ehlers.de/ehlers/IOUtools/raw/branch/master/iou_import \
  35. && wget -q https://git.bernhard-ehlers.de/ehlers/IOUtools/raw/branch/master/iou_export \
  36. && pyinstaller iou_import \
  37. && pyinstaller iou_export \
  38. && mkdir -p /usr/local/lib/IOUtools \
  39. && cp -a dist/iou_import/* dist/iou_export/* /usr/local/lib/IOUtools/ \
  40. && rm /usr/local/lib/IOUtools/ld-musl-* \
  41. && ln -s /usr/local/lib/IOUtools/iou_* /usr/local/bin/ \
  42. && rm -rf iou_import iou_export *.spec build dist \
  43. #
  44. # cleanup
  45. #
  46. && pip3 uninstall --quiet --yes PyInstaller altgraph future macholib pefile \
  47. && rm -rf /usr/lib/python3*/site-packages/PyInstaller \
  48. && rm -rf /root/.cache \
  49. && apk del build-deps
  50. ADD libc-i386.tar.gz /
  51. ADD init.sh /etc/
  52. CMD [ "sh", "/etc/init.sh" ]