|
@@ -16,18 +16,18 @@ ENV TZ Asia/Shanghai
|
|
|
ARG WORKER_HOME
|
|
|
|
|
|
#执行的命令
|
|
|
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
|
|
|
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
|
|
|
+RUN yum install -y unzip zip wget telnet tzdata
|
|
|
+RUN groupadd docker
|
|
|
+RUN useradd -d $WORKER_HOME -g docker -m docker
|
|
|
RUN mkdir -p $WORKER_HOME/config
|
|
|
-
|
|
|
+#设置工作目录
|
|
|
+WORKDIR $WORKER_HOME
|
|
|
#复制文件到容器内
|
|
|
COPY *.jar $WORKER_HOME/app.jar
|
|
|
COPY entrypoint.sh $WORKER_HOME/
|
|
|
COPY version.txt $WORKER_HOME/
|
|
|
COPY config/* $WORKER_HOME/config/
|
|
|
-#设置工作目录
|
|
|
-WORKDIR $WORKER_HOME
|
|
|
-RUN groupadd docker
|
|
|
-RUN useradd -d $WORKER_HOME -g docker -m docker
|
|
|
RUN chmod 755 entrypoint.sh
|
|
|
RUN chown -R docker:docker *
|
|
|
#查看上述复制的文件,是否复制成功
|