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
你好,麻烦提供下环境ID。