Necrose99

docker-arm7hf-sabayon-gentoo-builder

May 1st, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 5.59 KB | None | 0 0
  1. FROM sabayon/bananapi-armhfp
  2. ## rpi fork standard amr7hf image...
  3. ## FORK , since they've done the the hard work , use thier container
  4. ## add my Crap to my "Fork" of thier docker
  5. ## hub.docker.com/$user/name   docker hub or Quay.io will pull and rebuild it for ye...
  6. ## github or gitlab or hidable repo on bitbucket raw url to dockerfile or build.sh
  7. ## quay.io (often faster) or hub.docker.com builds docker pull $user/arm7hf-pkgbuilder && docker run privlaged from project dir. out should drop bins.. if fixed up.  
  8. ## https://github.com/multiarch/qemu-user-static/blob/master/register/qemu-binfmt-conf.sh host pc runing docker
  9. ## https://github.com/multiarch/qemu-user-static/releases , qemu is inside the image however can also FROM Scratch
  10. ## ADD URL://gentoo-arm64-stage-3  / # to a docker and meddle... so long as local qemu is built with proper support..
  11.  
  12.  
  13.  
  14. #  
  15. EXPOSE 22 873 111 111/udp 662 2049 38465-38467
  16. # Define standard volumes
  17. # EXPOSE 22 ssh , distcc, zerconf should add in auto discovery. NFS share out package  volumes if needed.
  18. VOLUME ["/usr/portage", "/usr/portage/distfiles", "/usr/portage/packages", "/var/lib/entropy/client/packages" /var/tmp/catalyst/builds/default /catalyst/]
  19.  
  20. # Define working directory.
  21. WORKDIR /
  22. ENTRYPOINT [/bin/bash]
  23. ## enable contaner to use bash and not a builder etc forced entrypoint. ie bash.../run-ssh-only.sh
  24. ## take user commands  via bash.
  25. # https://raw.githubusercontent.com/Sabayon/docker-armhfp/master/builder/Dockerfile
  26. # Define default command.
  27. ## ENTRYPOINT ["/usr/sbin/builder"] Since we just need the pre-fab container but not the entropy-pm builder force just bash.
  28. ##
  29.  
  30. ## https://github.com/janeczku/docker-nfs-ganesha/blob/master/rootfs/opt/start_nfs.sh  fork to allow /usr/portage/package etc R/W VOLUME's above... and or other configs over nfs/sshfs
  31.  
  32.  
  33. ###
  34. #
  35. # Add Tini ## cloud Init daemon with auto kill  if process hangs..
  36. ENV TINI_VERSION v0.18.0
  37. ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-armhf /tini
  38. RUN chmod +x /tini
  39. #ENTRYPOINT ["/tini", "--"]
  40.  
  41.  
  42.  
  43. RUN layman -L && layman -a pentoo && layman -S && emerge-webrsync
  44. ## update layman lists add pentoo && sync portage fast.
  45. RUN equo up && equo i dev-util/catalyst virtual/cdrtools dev-util/ccache app-text/asciidoc net-dns/avahi distcc sabayon-devkit enman app-misc/sabayon-sark RUN equo u && enman add pentesting && equo up
  46. ## entropy wraps around gentoo portage with --binpkgs...  at any rate..
  47. ## sabayon-devkit  app-misc/sabayon-sark  wraps docker to build repo's for you.
  48. ## quickpkg dev-python/*  from gentoo
  49. ## add gentoo catalyst enman
  50. #  add essentially pentoo although filtered. ie no kernel and or more troublesome packages req a hand touch..
  51. ## equo u equiv to emerge world but with prebuilt bins
  52. # equo up , update repo packages list
  53. # net-dns/avahi autoconf distcc
  54. RUN mkdir -p /etc/portage/package.accept_keywords
  55. RUN echo "*/*::gentoo ~arm64 ~arm" >> /etc/portage/package.accept_keywords/gentoo # else other repo-names.
  56. RUN echo "*/*::pentoo ~arm64 ~arm" >> /etc/portage/package.accept_keywords/pentoo
  57. RUN mkdir -p /var/tmp/catalyst/builds/default & mkdir /catalyst/
  58. # Run your program under Tini
  59. #CMD ["/your/program", "-and", "-its", "arguments"]
  60. CMD ["/tini", "avahi-daemon"]  ## avahi-daemon start init via tini
  61. CMD ["/tini", "distccd" "--no-detach", \
  62.      "--daemon", \
  63.      "--allow", "0.0.0.0"]
  64. RUN uname -a  
  65. ## show off. arm
  66. ADD https://pastebin.com/dl/sJArLT8x  /ebuildr
  67. RUN chmod +rx /ebuildr
  68. RUN echo starting Ebuilder script & pentoo-updater
  69. RUN /bin/bash ./ebuildr && ./var/lib/layman/pentoo/scripts/pentoo-updater.sh  
  70. ## fix all the things. as pentoo updater fixes pythons...
  71. RUN quickpkg */*
  72. ## package all the bins...
  73. RUN /bin/bash
  74.  
  75.  
  76. ### likely to time out on dockerhub/quay.io build , but not as much on local pc add to fork of this fork container yippy docker...
  77.  
  78. ## FROM $user/bananapi-armhfp-bin-build
  79. ## FORK , since they've done the the hard work , use thier container  could run catalyst from a new fork of forked containers
  80. ## layer upon layer..
  81. ### Add Catalyst items.
  82. ## ADD  http://distfiles.gentoo.org/experimental/arm/hardened/stage3-armv7a_hardfp-hardened-20171117.tar.bz2 -O /var/tmp/catalyst/builds/default
  83. #ADD  portage-latest.tar.bz2 http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 /var/tmp/catalyst/builds/default
  84. ## ADD portage dir to regen for seeds.
  85. #ADD  https://gitweb.gentoo.org/proj/releng.git/plain/releases/weekly/specs/arm/armv7a/hardfloat/stage1.spec /catalyst/
  86. #ADD  https://gitweb.gentoo.org/proj/releng.git/plain/releases/weekly/specs/arm/armv7a/hardfloat/stage2.spec /catalyst/
  87. #ADD  https://gitweb.gentoo.org/proj/releng.git/plain/releases/weekly/specs/arm/armv7a/hardfloat/stage3.spec /catalyst/
  88. ###
  89. ### ADD  URI /stage4-pentoo-custom-arm.spec /catalyst/
  90. ### hint ## https://gitweb.gentoo.org/proj/releng.git/plain/releases/weekly/specs/amd64/stage4-minimal.spec, add missing Pentoo ## package/s  , match arm7hf spec..
  91. ## mega-hint https://github.com/steveeJ/catalyst-specs/blob/master/EXAMPLE.spec well documented...
  92. #portage_overlay: /usr/local/portage/personal-portage-overlay , portage_overlay: /var/lib/layman/pentoo
  93. ## Invoke stage3 rebuild with stage1,2,3 seeds , can add stage4 or other scripted specs.
  94. # https://github.com/pentoo/pentoo-livecd/blob/master/livecd/catalyst/catalystrc  pentoo's moded rc.
  95. ## conf https://github.com/pentoo/pentoo-livecd/blob/master/livecd/catalyst/catalyst.conf
  96. ## catalyst -f stage1.spec && catalyst -f stage2.spec && catalyst -f stage3.spec ## && catalyst -f "My-custom-stage4.spec"
  97. # ADD URL catalyst.conf /
Add Comment
Please, Sign In to add comment