收藏
回答

云托管新建版本时构建失败,mvn命令无法执行如何解决?

FROM maven:3.8.3-openjdk-8 as builder
WORKDIR /myprj
COPY ./myprj/pom.xml .
COPY ./myprj/src ./src
RUN mvn package -DskipTests


上面是Dockerfile,下面是自动构建时的报错:

[2021-11-09 18:19:17] Step 5/5 : RUN mvn package -DskipTests
[2021-11-09 18:19:17]  ---> Running in 30203843a062
[2021-11-09 18:19:17] [91mls: cannot access '/usr/bin/mvn': Operation not permitted
[2021-11-09 18:19:17] [0m[91mError: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
[2021-11-09 18:19:17] [0mThe command '/bin/sh -c mvn package -DskipTests' returned a non-zero code: 1
script returned exit code 1
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签