宿主机不想装maven,想使用docker的maven镜像编译项目,打成jar包 ,但是maven容器一直启动不了

问题遇到的现象和发生背景

本地maven可以打包linux的maven容器打不了包

不要说注释 和更改里面的值

docker run -it --rm -v maven-repo:/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven registry.cn-hangzhou.aliyuncs.com/acs/maven:3-jdk-8 mvn clean package -DskipTests
问题相关代码,请勿粘贴截图

任何springboot代码都不行

运行结果及报错内容
[root@weewemice]# docker run -it --rm -v maven-repo:/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven registry.cn-hangzhou.aliyuncs.com/acs/maven:3-jdk-8 mvn clean package -DskipTests
[INFO] Scanning for projects...
Downloading from aliyun-nexus: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-dependencies/2.1.3.RELEASE/spring-boot-dependencies-2.1.3.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-fileupload:commons-fileupload:jar -> duplicate declaration of version 1.3.2 @ line 92, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-codec:commons-codec:jar -> duplicate declaration of version 1.9 @ line 97, column 21
[FATAL] Non-resolvable parent POM for org.hoyozero.mice:mice:1.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.1.3.RELEASE from/to aliyun-nexus (http://maven.aliyun.com/nexus/content/groups/public/): maven.aliyun.com: Temporary failure in name resolution and 'parent.relativePath' points at no local POM @ line 11, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.hoyozero.mice:mice:1.0-SNAPSHOT (/usr/src/mymaven/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.hoyozero.mice:mice:1.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.1.3.RELEASE from/to aliyun-nexus (http://maven.aliyun.com/nexus/content/groups/public/): maven.aliyun.com: Temporary failure in name resolution and 'parent.relativePath' points at no local POM @ line 11, column 13: Unknown host maven.aliyun.com: Temporary failure in name resolution -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
[root@iZ2zea17dskhimi1m716kfZ mice]# docker run -it --rm -v maven-repo:/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven registry.cn-hangzhou.aliyuncs.com/acs/maven:3-jdk-8 mvn clean package -DskipTests


我的解答思路和尝试过的方法

这些方法我都试过了不行
https://www.jb51.net/article/141431.htm
https://baijiahao.baidu.com/s?id=1727466767605824176&wfr=spider&for=pc
https://hub.docker.com/_/maven

我想要达到的结果

可以用maven容器把源码编译成jar包

这个,其实,直接装maven,不是更香吗。。。