Dockerfile 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. FROM i386/debian:buster
  2. ENV DEBIAN_FRONTEND noninteractive
  3. # Update and install necessary packages
  4. RUN apt update && \
  5. apt --yes --no-install-recommends install \
  6. linux-image-686 grub2 systemd \
  7. libterm-readline-perl-perl \
  8. gcc make libc6-dev \
  9. unzip bzip2 xz-utils \
  10. fluxbox \
  11. i3-wm \
  12. cmake \
  13. fuse \
  14. xorg xserver-xorg-input-kbd xserver-xorg-input-mouse xserver-xorg-input-evdev \
  15. xserver-xorg-video-fbdev xserver-xorg-video-vesa \
  16. xserver-xorg x11-xserver-utils xinit dbus-x11 \
  17. libgdk-pixbuf2.0 libpango-1.0 libpangocairo-1.0 libgtk2.0-bin \
  18. libc-l10n locales \
  19. fonts-noto fonts-droid-fallback \
  20. strace file xterm vim apt-file \
  21. dhcpcd5 \
  22. ca-certificates \
  23. git \
  24. wget curl \
  25. net-tools netcat \
  26. wmctrl xdotool \
  27. libssl-dev \
  28. mesa-utils libgl1-mesa-dri \
  29. && \
  30. touch /root/.Xdefaults && \
  31. echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
  32. locale-gen && \
  33. echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
  34. chsh -s /bin/bash && \
  35. echo "root:root" | chpasswd && \
  36. mkdir -p /etc/systemd/system/serial-getty@ttyS0.service.d/ && \
  37. systemctl enable serial-getty@ttyS0.service && \
  38. rm /lib/systemd/system/getty.target.wants/getty-static.service && \
  39. rm /etc/motd /etc/issue && \
  40. systemctl disable systemd-timesyncd.service && \
  41. systemctl disable apt-daily.timer && \
  42. systemctl disable apt-daily-upgrade.timer && \
  43. systemctl disable dhcpcd.service && \
  44. echo "tmpfs /tmp tmpfs nodev,nosuid 0 0" >> /etc/fstab && \
  45. cd /root/ && \
  46. wget http://www.math.utah.edu/~mayer/linux/nbench-byte-2.2.3.tar.gz && \
  47. tar xfv nbench-byte-2.2.3.tar.gz && \
  48. rm nbench-byte-2.2.3.tar.gz && \
  49. mv nbench-byte-2.2.3 bench && \
  50. cd bench && \
  51. make
  52. # Copy necessary configuration files
  53. COPY getty-noclear.conf getty-override.conf /etc/systemd/system/getty@tty1.service.d/
  54. COPY getty-autologin-serial.conf /etc/systemd/system/serial-getty@ttyS0.service.d/
  55. COPY logind.conf /etc/systemd/logind.conf
  56. # COPY xinitrc /root/.xinitrc
  57. COPY xorg.conf /etc/X11/
  58. COPY networking.sh /root/
  59. COPY boot-9p /etc/initramfs-tools/scripts/boot-9p
  60. # this needs to be commented out in order to boot from hdd
  61. RUN printf '%s\n' 9p 9pnet 9pnet_virtio virtio virtio_ring virtio_pci | tee -a /etc/initramfs-tools/modules && \
  62. echo 'BOOT=boot-9p' | tee -a /etc/initramfs-tools/initramfs.conf && \
  63. update-initramfs -u
  64. # Clean up unnecessary files
  65. RUN apt-get --yes clean && \
  66. rm -r /var/lib/apt/lists/* && \
  67. rm -r /usr/share/doc/* && \
  68. rm -r /usr/share/man/* && \
  69. rm -r /usr/share/locale/?? && \
  70. rm /var/log/*.log /var/log/lastlog /var/log/wtmp /var/log/apt/*.log /var/log/apt/*.xz
  71. # Install Tailscale
  72. RUN curl -fsSL https://tailscale.com/install.sh | sh
  73. RUN chmod +x /root/networking.sh
  74. # Install Go and puter-fuse
  75. RUN wget https://go.dev/dl/go1.22.1.linux-386.tar.gz && \
  76. tar -C /usr/local -xzf go1.22.1.linux-386.tar.gz && \
  77. rm go1.22.1.linux-386.tar.gz && \
  78. export PATH=$PATH:/usr/local/go/bin && \
  79. go install github.com/HeyPuter/puter-fuse@v1.0.0 && \
  80. mv /root/go/bin/puter-fuse /usr/local/bin && \
  81. rm -rf /root/go && \
  82. rm -f /go1.22.1.linux-386.tar.gz
  83. RUN echo "kernel.printk = 3 4 1 3" >>/etc/sysctl.conf