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