【发布时间】:2019-03-01 08:25:34
【问题描述】:
DockerFile - 路径是 rootDirectory/odm-ondocker/decisionserver/decisionserverconsole。
ARG FROMLIBERTY
FROM maven:3.5.2-jdk-8-alpine AS builder
ARG ODMDOCKERDIR
ENV ODMDOCKERDIR $ODMDOCKERDIR
ENV SCRIPT /script
ENV APPS /config/apps
COPY $ODMDOCKERDIR/welcomepage /welcomepage
COPY $ODMDOCKERDIR/common/script $SCRIPT
COPY $ODMDOCKERDIR/common/drivers /config/resources
COPY $ODMDOCKERDIR/common/features $SCRIPT
COPY $ODMDOCKERDIR/decisionserver/decisionserverconsole/script $SCRIPT
COPY $ODMDOCKERDIR/decisionserver/decisionserverruntime/script $SCRIPT
# Use production liberty if needed
RUN echo $SCRIPT
COPY $ODMDOCKERDIR/resources/* /wlp-embeddable/
RUN chmod a+x $SCRIPT/fixWLPForProduction.sh && sync && $SCRIPT/fixWLPForProduction.sh
# Install missing require package in the alpine builder image
RUN apk add --no-cache bash perl ca-certificates wget
# Build Welcome page
RUN cd /welcomepage; mvn -B clean install | grep -v 'Download.*' && mkdir -p $APPS
我在 RUN chmod a+x $SCRIPT/fixWLPForProduction.sh && sync && $SCRIPT/fixWLPForProduction.sh 线上遇到错误,如下所示:-
/bin/sh: /script/fixWLPForProduction.sh: 未找到 错误:服务“odm-decisionserverconsole”无法构建:命令“/bin/sh -c chmod a+x $SCRIPT/fixWLPForProduction.sh && sync && $SCRIPT/fixWLPForProduction.sh”返回非零代码:127
我是 docker 新手,因此无法弄清楚为什么它会出现,尽管该文件存在于根目录/common/scripts 文件夹中。我想通了,它试图找到 /odm-ondocker/common/script 下的脚本文件夹。我尝试将 SCRIPT 变量的值作为 /common/script 给出,但它仍然给出为 Not Found。
【问题讨论】:
标签: docker-compose dockerfile odm