12345678910111213141516171819202122232425262728293031323334353637 |
- #构建此镜像的基础镜像
- FROM registry.persagy.com/base/centos:v-jdk1.8
- #指定作者名称
- MAINTAINER lijie<lijie@persagy.com>
- #定义标签属性
- LABEL tier=backend
- LABEL product=bdtp
- LABEL project=adm-middleware
- LABEL name=adm-middleware
- #设置环境变量
- ENV JAVA_OPTS -Dfile.encoding=UTF-8 -Xms2048m -Xmx2048m
- ENV TZ Asia/Shanghai
- #ARG 可以接收docker build命令中以--build-arg 指定的参数
- ARG WORKER_HOME
- #执行的命令
- RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
- RUN mkdir -p $WORKER_HOME/config
- #复制文件到容器内
- COPY *.jar $WORKER_HOME/app.jar
- COPY entrypoint.sh $WORKER_HOME/
- COPY version.txt $WORKER_HOME/
- COPY config $WORKER_HOME/config
- COPY temp $WORKER_HOME/temp
- #设置工作目录
- WORKDIR $WORKER_HOME
- #查看上述复制的文件,是否复制成功
- RUN ls
- #启动执行
- ENTRYPOINT ["sh","./entrypoint.sh"]
|