Dockerfile 1.0 KB

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