Docker:Jar:找不到

我是Docker的新手,在Ubuntu环境中为我们的应用程序开发Docker镜像。

但是,从docker-entrypoint文件内的Dockerfile /内部执行时,下面的命令不起作用。

命令:“jar xf ./abc.ear”

_ / docker-entrypoint.sh:69:/docker-entrypoint.sh:jar:not found **

我validation了ear文件存在于目录中。

我尝试传递完整path到耳朵或通过完整path到Jar命令,但是,没有成功。

请帮忙。

……………

#!/bin/sh set -e start=$(date +'%s') # Setting Environment Variables DEPLOY_DIR=/home/docker/xyz SCRIPT_DIR=/usr/local/src if [ "$(ls -A $DEPLOY_DIR/Install 2> /dev/null)" = "" ]; then echo "The directory $DEPLOY_DIR/Install is empty." # Fetch Installable from Artifactory echo "[INFO] Extracting files from Artifactory" mkdir -p $DEPLOY_DIR cd $DEPLOY_DIR wget -nv ArtifactoryPath unzip "123.zip" -d $DEPLOY_DIR # Install cd $DEPLOY_DIR/ Install command # Configure JAVA echo "[INFO] Linking java folder" ln -s /usr/lib/jvm/java-8-oracle $DEPLOY_DIR/Install/jdk # Explode ear and war files echo "[INFO] Explode ear and war files\n" cd $DEPLOY_DIR/Install/jboss/deployments ls -al mv "$WFC_DEPLOY_DIR/Install/jboss/deployments/abc.ear" "$WFC_DEPLOY_DIR/Install/jboss/deployments/abc-old.ear" mkdir -p abc.ear cd $DEPLOY_DIR/Install/jboss/deployments/abc.ear echo $PWD mv "$DEPLOY_DIR/Install/jboss/deployments/abc-old.ear" ./ ls -al jar xvf "$DEPLOY_DIR/Install/jboss/deployments/abc.ear/abc-old.ear" rm -rf $DEPLOY_DIR/Install/jboss/deployments/abc.ear/abc-old.ear else echo "$DEPLOY_DIR/Install is not empty." fi