1

我有一个简单的Talend 作业 ,它读取librsvg2-bin库的版本,将其写入文件并将其发送到 Azure Blob。

组件 tSystem 需要执行这个命令: rsvg-convert -v.

当我运行容器时,我收到了这条消息:

java.io.IOException: Cannot run program "rsvg-convert": error=2, No such file or directory
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at runscriptdemo.containersdemo_0_1.ContainersDemo.tSystem_1Process(ContainersDemo.java:1581)
at runscriptdemo.containersdemo_0_1.ContainersDemo.tFileInputXML_1Process(ContainersDemo.java:1218)
at runscriptdemo.containersdemo_0_1.ContainersDemo.runJobInTOS(ContainersDemo.java:3145)
at runscriptdemo.containersdemo_0_1.ContainersDemo.main(ContainersDemo.java:2963)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 8 more

我想这与 rsvg-convert 库路径有关。有没有办法解决这个问题?

这是我的码头文件:

    FROM centos:7.3.1611
    # Java arguments
    ARG java_jre_version=8u131
    ARG java_jre_build_num=b11
    ARG java_jre_download_hash=d54c1d3a095b4ff2b6607d096fa80163
    ARG java_jre_checksum=ebebfd327e67c4bbe47dabe6b9f6e961
    ARG java_home=/usr/java/latest
    ARG talend_job=simple_job
    ARG talend_version=0.1


    #talend job variables
    ENV TALEND_JOB ${talend_job}
    ENV TALEND_VERSION ${talend_version}
    ENV ARGS "" 

    # envrionment variables
    ENV JAVA_HOME ${java_home} 
    ENV PATH $JAVA_HOME/bin:$PATH

    # Java Installation
    RUN yum install -y wget && \
    wget --quiet --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/${java_jre_version}-${java_jre_build_num}/${java_jre_download_hash}/jre-${java_jre_version}-linux-x64.rpm" && \
    echo "${java_jre_checksum}  jre-${java_jre_version}-linux-x64.rpm" >> MD5SUM && \
    md5sum -c MD5SUM && \
    yum install -y "jre-${java_jre_version}-linux-x64.rpm" \
    && yum clean all \
    && rm -rf "jre-${java_jre_version}-linux-x64.rpm" \
    && update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 999999 


    WORKDIR /opt/talend

    COPY ${TALEND_JOB}_${talend_version}.zip .        

    RUN yum install -y unzip && \
    unzip ${TALEND_JOB}_${TALEND_VERSION}.zip && \
    rm -rf ${TALEND_JOB}_${TALEND_VERSION}.zip && \
    chmod +x ${TALEND_JOB}/${TALEND_JOB}_run.sh         

    RUN yum -y install librsvg2        

    VOLUME /data/context        

    CMD ["/bin/sh","-c","${TALEND_JOB}/${TALEND_JOB}_run.sh ${ARGS}"]
4

0 回答 0