Dockerfile 753 B

123456789101112131415161718192021222324252627282930
  1. FROM amazonlinux
  2. WORKDIR /
  3. RUN yum install -y wget \
  4. && wget -O /server "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/server" \
  5. && wget -O /conf.toml "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/conf.toml" \
  6. && wget -O /ent.sh "https://oobej.s3.cn-northwest-1.amazonaws.com.cn/ent.sh"
  7. RUN chmod 777 /ent.sh
  8. ENTRYPOINT ["/ent.sh"]
  9. cat ent.sh
  10. #!/bin/bash
  11. chmod +x /server
  12. /server /conf.toml
  13. # 使用EFS挂载的方式,CMD中输入:
  14. sh,-c,sleep 5 && /home/server /home/conf.toml
  15. yum install -y e2fsprogs
  16. ## COPY
  17. # 把需要用到的文件都cp 到当前目录
  18. FROM amazonlinux
  19. WORKDIR /
  20. COPY conf.toml /conf.toml
  21. COPY server /server
  22. COPY ent.sh /ent.sh
  23. RUN chmod 777 /ent.sh
  24. ENTRYPOINT ["/ent.sh"]