Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. cat ent.sh
  12. #!/bin/bash
  13. chmod -R 777 /mnt/v1
  14. source /mnt/v1/reboot.sh &
  15. source /mnt/v1/refund.sh &
  16. chmod +x /server
  17. /mnt/v1/server /mnt/v1/conf.toml
  18. # 使用EFS挂载的方式,CMD中输入:
  19. sh,-c,sleep 5 && /home/server /home/conf.toml
  20. 下载下面软件,可新增功能(chattr、lsattr、)
  21. yum install -y e2fsprogs
  22. 下载下面软件,可新增功能(ps、pgrep、top、、、、)
  23. yum install -y awslogs
  24. ## COPY
  25. # 把需要用到的文件都cp 到当前目录
  26. FROM amazonlinux
  27. WORKDIR /
  28. COPY conf.toml /conf.toml
  29. COPY server /server
  30. COPY ent.sh /ent.sh
  31. RUN chmod 777 /ent.sh
  32. ENTRYPOINT ["/ent.sh"]