Metadata for the ArchiveTeam Docker Hub repositories
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.
 
 

81 lines
1.8 KiB

  1. # Use phusion/baseimage as base image.
  2. FROM phusion/baseimage:0.11
  3. # Use baseimage-docker's init system.
  4. CMD ["/sbin/my_init"]
  5. ADD get-wget-lua.sh /
  6. # Install dependencies
  7. RUN apt-get update \
  8. && apt-get install -y --no-install-recommends \
  9. autoconf \
  10. flex \
  11. gcc \
  12. git \
  13. isc-dhcp-client \
  14. jq \
  15. libgnutls28-dev \
  16. liblua5.1-0 \
  17. liblua5.1-0-dev \
  18. make \
  19. net-tools \
  20. pciutils \
  21. python \
  22. python-pip \
  23. python-setuptools \
  24. python3 \
  25. python3-pip \
  26. python3-setuptools \
  27. rsync \
  28. software-properties-common \
  29. sudo \
  30. wget \
  31. && chmod +x /get-wget-lua.sh && sync && bash -c "/get-wget-lua.sh" \
  32. && apt-get remove -y \
  33. autoconf \
  34. flex \
  35. gcc \
  36. libgnutls28-dev \
  37. liblua5.1-0-dev \
  38. make \
  39. && apt-get clean && apt-get autoremove -y \
  40. && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  41. # Setup system for the warrior
  42. RUN useradd warrior
  43. RUN mkdir /home/warrior && chown warrior: /home/warrior
  44. # Clone warrior code
  45. USER warrior
  46. WORKDIR /home/warrior
  47. RUN git clone -b docker https://github.com/ArchiveTeam/warrior-code2.git
  48. USER root
  49. # Add the boot script (this will install the actual warrior on boot)
  50. RUN mkdir -p /etc/my_init.d
  51. ADD boot.sh /etc/my_init.d/warrior-boot.sh
  52. # running as root and/or requiring sudo is a bad practice in docker containers,
  53. # sadly sudo is hard-coded all over the place in `warrior-code2`
  54. RUN echo "warrior ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  55. # Expose web interface port
  56. EXPOSE 8001
  57. # Add the warrior service entry for runit
  58. RUN mkdir /etc/service/warrior
  59. ADD warrior.sh /etc/service/warrior/run
  60. # ENV to JSON
  61. ADD env-to-json.sh /home/warrior
  62. ENV DOWNLOADER=""
  63. ENV HTTP_PASSWORD=""
  64. ENV HTTP_USERNAME=""
  65. ENV SELECTED_PROJECT=""
  66. ENV SHARED_RSYNC_THREADS=""
  67. ENV WARRIOR_ID=""
  68. ENV CONCURRENT_ITEMS=""