Dockerfile 790 B

123456789101112131415161718192021222324252627282930
  1. #构建此镜像的基础镜像
  2. FROM registry.persagy.com/base/centos:v-jdk1.8
  3. #指定作者名称
  4. MAINTAINER lijie<lijie@persagy.com>
  5. #定义标签属性
  6. LABEL tier=backend
  7. LABEL product=integrated
  8. LABEL project=job-executor
  9. LABEL name=integrated-job
  10. ARG WORKER_HOME
  11. ENV TZ=Asia/Shanghai
  12. ENV JAVA_OPTS -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=75.0 -XX:MinRAMPercentage=75.0
  13. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
  14. #复制文件到容器内
  15. RUN mkdir -p $WORKER_HOME/config
  16. COPY config $WORKER_HOME/config
  17. COPY *.jar $WORKER_HOME/
  18. COPY entrypoint.sh $WORKER_HOME/
  19. #设置工作目录
  20. WORKDIR $WORKER_HOME
  21. #查看上述复制的文件,是否复制成功
  22. RUN ls
  23. #启动执行
  24. ENTRYPOINT ["sh","./entrypoint.sh"]