我正在尝试为我的maven项目编写一个Dockerfile。这是我的Dockerfile中的代码片段:
FROM maven:latest
MAINTAINER Syed R Abdullah (syed.r.abdullah@gmail.com)
COPY pom.xml /usr/local/service/pom.xml
COPY src /usr/local/service/src
WORKDIR /usr/local/service
RUN mvn package
CMD ["java","-cp","target/generatename-0.0.1-SNAPSHOT.jar","com.syed.generatename.GenerateName"]
我收到以下错误:
The command '/bin/sh -c mvn package' returned a non-zero code: 1
我该如何解决?谢谢。