Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM rancher/os-rootfs
  2. RUN ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
  3. # Cleanup Buildroot
  4. RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
  5. sed -i '/^root/s!/bin/sh!/bin/bash!' /etc/passwd && \
  6. echo 'RancherOS \n \l' > /etc/issue && \
  7. rm -rf /run \
  8. /linuxrc \
  9. /etc/os-release \
  10. /var/cache \
  11. /var/lock \
  12. /var/log \
  13. /var/run \
  14. /var/spool \
  15. /var/lib/misc && \
  16. mkdir -p \
  17. /home \
  18. /run \
  19. /var/cache \
  20. /var/lock \
  21. /var/log \
  22. /var/run \
  23. /var/spool && \
  24. passwd -l root && \
  25. addgroup -g 1100 rancher && \
  26. addgroup -g 1101 docker && \
  27. addgroup -g 1103 sudo && \
  28. adduser -u 1100 -G rancher -D -h /home/rancher -s /bin/bash rancher && \
  29. adduser -u 1101 -G docker -D -h /home/docker -s /bin/bash docker && \
  30. adduser rancher docker && \
  31. adduser rancher sudo && \
  32. adduser docker sudo && \
  33. echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers
  34. COPY inputrc /etc/inputrc
  35. COPY entry.sh /usr/sbin/entry.sh
  36. COPY growpart /usr/bin/growpart
  37. ENTRYPOINT ["/usr/sbin/entry.sh"]