Home > front end >  apache/data-generator docker image build fails during Apache Flink workthrough
apache/data-generator docker image build fails during Apache Flink workthrough

Time:04-27

apache/data-generator docker image build fails during Apache Flink workthrough.
How possibly to overcome or fix this?

Apache Flink workthrough "Real Time Reporting with the Table API" https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/table_api/

fails during docker-compose build over apache/data-generator, see log below.
However, I cannot even locate/find where it is on Github or on Docker Hub

https://registry.hub.docker.com/r/apache/data-generator is 404 Not found https://github.com/apache/data-generator is 404 Not found

Line within docker-compose.yml

  data-generator:
      image: apache/data-generator:1

Docker versions used:

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]

CodePudding user response:

How are you building the Docker image? I've just cloned the repository and ran docker build . in the docker/data-generator folder.

https://github.com/apache/flink-playgrounds/tree/master/docker

The image was built successfully for me. Can you run mvn clean install in this folder? I'm wondering if this is more a Maven problem, not being able to access the Internet, then it is a problem with the build itself.

Change from
FROM maven:3.6-jdk-8-slim AS builder
to
FROM maven:3.8-jdk-8-slim AS builder
So the troubled v2.5 of maven-clean-plugin is not used,
as newer maven defaults to newer plugins versions.

  • Related