我正在创建一个 Maven 项目的 docker 映像。这是码头文件
FROM java:8
# Install maven
RUN apt-get update
RUN apt-get install -y maven
WORKDIR ~/mmt/CouchBaseClient/CB-RestAPI/CacheService
# Prepare by downloading dependencies
#ADD pom.xml /mmt/CouchBaseClient/CB-RestAPI/CacheService/pom.xml
#RUN ["mvn", "dependency:resolve"]
#RUN ["mvn", "verify"]
ADD cacheService-0.0.1-SNAPSHOT.jar /target/cacheService-0.0.1-SNAPSHOT.jar
EXPOSE 4567
CMD ["/usr/lib/jvm/java-8-openjdk-amd64/bin/java", "-jar", "target/couchclient-0.0.1-SNAPSHOT.jar server cacheService.yml]
当我运行以下命令来构建我的图像时
sudo docker build -t myimage .
我收到以下错误
Step 5 : ADD cacheService-0.0.1-SNAPSHOT.jar /target/cacheService-0.0.1-SNAPSHOT.jar
lstat cacheService-0.0.1-SNAPSHOT.jar: no such file or directory
但是我在那里有我的文件..我该怎么做