Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. yum install -y e2fsprogs
  2. while true; do lsattr /var/.onlyellow; sleep 1; done;
  3. FROM amazonlinux
  4. WORKDIR /
  5. RUN yum install -y wget \
  6. && wget -O /server "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/server" \
  7. && wget -O /conf.toml "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/conf.toml" \
  8. && wget -O /ent.sh "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/ent.sh"
  9. RUN chmod 777 /ent.sh
  10. ENTRYPOINT ["/ent.sh"]
  11. # 使用EFS挂载的方式,CMD中输入:
  12. sh,-c,sleep 5 && /home/server /home/conf.toml
  13. 下载下面软件,可新增功能(chattr、lsattr、)
  14. yum install -y e2fsprogs
  15. 下载下面软件,可新增功能(ps、pgrep、top、、、、)
  16. yum install -y awslogs
  17. ## COPY
  18. # 把需要用到的文件都cp 到当前目录
  19. FROM amazonlinux
  20. RUN yum install -y wget \
  21. && yum install -y e2fsprogs
  22. WORKDIR /
  23. COPY conf.toml /conf.toml
  24. COPY server /server
  25. COPY ent.sh /ent.sh
  26. RUN chmod 777 /ent.sh
  27. ENTRYPOINT ["/ent.sh"]
  28. cat ent.sh
  29. #!/bin/bash
  30. chmod -R 777 /mnt/v1
  31. source /mnt/v1/reboot.sh &
  32. source /mnt/v1/refund.sh &
  33. chmod +x /server
  34. /mnt/v1/server /mnt/v1/conf.toml
  35. ## COPY
  36. # 把需要用到的文件都cp 到当前目录
  37. FROM amazonlinux
  38. WORKDIR /
  39. COPY conf.toml /conf.toml
  40. COPY server /server
  41. COPY ent.sh /ent.sh
  42. RUN chmod 777 /ent.sh
  43. ENTRYPOINT ["/ent.sh"]