docker构建后端镜像404错误
使用docker部署构建后端镜像时出现错误
Remove one or more images
Sending build context to Docker daemon 551.9kB
Step 1/12 : FROM openjdk:11.0.14.1-jdk-buster
---> e1da0613075b
Step 2/12 : ARG MAVEN_VERSION=3.8.5
---> Using cache
---> 88654dda59e8
Step 3/12 : ARG USER_HOME_DIR="/root"
---> Using cache
---> 5c3dc14a8eab
Step 4/12 : ARG SHA=89ab8ece99292476447ef6a6800d9842bbb60787b9b8a45c103aa61d2f205a971d8c3ddfb8b03e514455b4173602bd015e82958c0b3ddc1728a57126f773c743
---> Using cache
---> 90cbbe118c9c
Step 5/12 : ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
---> Using cache
---> 2e889053e54e
Step 6/12 : RUN mkdir -p /usr/share/maven /usr/share/maven/ref && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz && echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && rm -f /tmp/apache-maven.tar.gz && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
---> Running in 54b6ca53cf33
curl: (22) The requested URL returned error: 404 Not Found
The command '/bin/sh -c mkdir -p /usr/share/maven /usr/share/maven/ref && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz && echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && rm -f /tmp/apache-maven.tar.gz && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn' returned a non-zero code: 22
-
改了版本号之后是还要该其它地方吗?改了dockerfile里的版本号又出现校验和错误
Step 6/12 : RUN mkdir -p /usr/share/maven /usr/share/maven/ref && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz && echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && rm -f /tmp/apache-maven.tar.gz && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
---> Running in b70cfca243c0
sha512sum: WARNING: 1 computed checksum did NOT match
/tmp/apache-maven.tar.gz: FAILED -
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:20 min
[INFO] Finished at: 2022-06-21T03:32:43Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project cloud-api-sample: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:3.2.0 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven:maven-artifact:jar:3.1.0 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/3.1.0/maven-artifact-3.1.0.jar: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.92.215] failed: Connection timed out (Connection timed out) -> [Help 1]这个错误是因为网络原因?
请先登录再写评论。
评论
7 条评论