apache/data-generator docker 图像构建在 Apache Flink 解决过程中失败
apache/data-generator docker image build fails during Apache Flink workthrough
apache/data-generator
docker 图像构建在 Apache Flink 工作期间失败。
怎么可能克服或解决这个问题?
Apache Flink 解决方案“使用 Table API 进行实时报告”
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/table_api/
在 docker-compose build
期间失败 apache/data-generator
,请参阅下面的日志。
但是,我什至不能 locate/find 在 Github 或 Docker Hub
上
https://registry.hub.docker.com/r/apache/data-generator 是 404 未找到
https://github.com/apache/data-generator 是 404 未找到
行内 docker-compose.yml
data-generator:
image: apache/data-generator:1
Docker 使用的版本:
docker -v
Docker version 19.03.1, build 74b1e89
docker-compose -v
docker-compose version 1.24.1, build 4667896b
Building data-generator
Step 1/9 : FROM maven:3.6-jdk-8-slim AS builder
---> f3f54c8fc76f
Step 2/9 : COPY ./src /opt/data-producer/src
---> Using cache
---> c0d6bf40fbd8
Step 3/9 : COPY ./pom.xml /opt/data-producer/pom.xml
---> Using cache
---> 680f7d2e0bc9
Step 4/9 : RUN cd /opt/data-producer; mvn clean install
---> Running in 22b207990a13
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.flink:data-generator >-------------------
[INFO] Building data-generator 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.456 s
[INFO] Finished at: 2022-04-25T18:14:40Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom: Invalid argument or cannot assign requested address -> [Help 1]
您如何构建 Docker 图像?我刚刚在 docker/data-generator
文件夹中克隆了存储库和 运行 docker build .
。
https://github.com/apache/flink-playgrounds/tree/master/docker
我的镜像构建成功。你能在这个文件夹里运行mvn clean install
吗?我想知道这是不是更多的Maven问题,无法访问互联网,那么它是构建本身的问题。
变化自
FROM maven:3.6-jdk-8-slim AS builder
至
FROM maven:3.8-jdk-8-slim AS builder
所以maven-clean-plugin的麻烦v2.5没有用,
因为较新的 Maven 默认使用较新的插件版本。
apache/data-generator
docker 图像构建在 Apache Flink 工作期间失败。
怎么可能克服或解决这个问题?
Apache Flink 解决方案“使用 Table API 进行实时报告” https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/table_api/
在 docker-compose build
期间失败 apache/data-generator
,请参阅下面的日志。
但是,我什至不能 locate/find 在 Github 或 Docker Hub
https://registry.hub.docker.com/r/apache/data-generator 是 404 未找到 https://github.com/apache/data-generator 是 404 未找到
行内 docker-compose.yml
data-generator:
image: apache/data-generator:1
Docker 使用的版本:
docker -v
Docker version 19.03.1, build 74b1e89
docker-compose -v
docker-compose version 1.24.1, build 4667896b
Building data-generator
Step 1/9 : FROM maven:3.6-jdk-8-slim AS builder
---> f3f54c8fc76f
Step 2/9 : COPY ./src /opt/data-producer/src
---> Using cache
---> c0d6bf40fbd8
Step 3/9 : COPY ./pom.xml /opt/data-producer/pom.xml
---> Using cache
---> 680f7d2e0bc9
Step 4/9 : RUN cd /opt/data-producer; mvn clean install
---> Running in 22b207990a13
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.flink:data-generator >-------------------
[INFO] Building data-generator 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.456 s
[INFO] Finished at: 2022-04-25T18:14:40Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom: Invalid argument or cannot assign requested address -> [Help 1]
您如何构建 Docker 图像?我刚刚在 docker/data-generator
文件夹中克隆了存储库和 运行 docker build .
。
https://github.com/apache/flink-playgrounds/tree/master/docker
我的镜像构建成功。你能在这个文件夹里运行mvn clean install
吗?我想知道这是不是更多的Maven问题,无法访问互联网,那么它是构建本身的问题。
变化自
FROM maven:3.6-jdk-8-slim AS builder
至
FROM maven:3.8-jdk-8-slim AS builder
所以maven-clean-plugin的麻烦v2.5没有用,
因为较新的 Maven 默认使用较新的插件版本。