Skip to content

Unable to build docker images #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ravening opened this issue Aug 23, 2022 · 4 comments
Open

Unable to build docker images #20

ravening opened this issue Aug 23, 2022 · 4 comments

Comments

@ravening
Copy link

Getting error while building docker image

docker build -t demo-fraud-webapp:latest -f webapp/webapp.Dockerfile webapp/
[+] Building 1.7s (5/5) FINISHED
 => [internal] load build definition from webapp.Dockerfile                                                                                                                                                                                                                0.0s
 => => transferring dockerfile: 974B                                                                                                                                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                          0.0s
 => => transferring context: 34B                                                                                                                                                                                                                                           0.0s
 => CANCELED [internal] load metadata for docker.io/library/openjdk:8-jdk-alpine                                                                                                                                                                                           1.6s
 => [internal] load metadata for docker.io/library/node:10                                                                                                                                                                                                                 1.4s
 => ERROR [internal] load metadata for docker.io/library/maven:3.6.2-jdk-8-openj9                                                                                                                                                                                          1.6s
------
 > [internal] load metadata for docker.io/library/maven:3.6.2-jdk-8-openj9:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:31378686fda613ca2a502a1731b12ff2d7a8dacabec2160715ebecb461fd3642: not found

Made some modification to the versions but the source code has errors with ClassNotFoundException

Changes to docker files

flik-job/Dockerfile

-FROM flink:1.8.2
+FROM flink:1.15.1-java8
webapp/webapp.Dockerfile

# --- Maven Build
-FROM maven:3.6.2-jdk-8-openj9 as maven-build
+FROM maven:3.8.6-openjdk-11 as maven-build

# --- Main container
-FROM openjdk:8-jdk-alpine as main
+FROM openjdk:11 as main

Making the above cdhanges, builds the docker images successfully but getting error while running the conatiners

java.lang.NoSuchMethodError: org.apache.flink.api.common.state.OperatorStateStore.getSerializableListState(Ljava/lang/String;)Lorg/apache/flink/api/common/state/ListState;


java.lang.NoClassDefFoundError: org/apache/flink/shaded/guava18/com/google/common/collect/Lists


java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
@afedulov
Copy link
Owner

@ravening are you on an M1 mac?

@ravening
Copy link
Author

@ravening are you on an M1 mac?

@afedulov yes.. I also used --platform=arch/x86_64 but that also didn't help

@ravening
Copy link
Author

there are many other issues with this project as the versions are outdated. just not worth troubleshooting the issue.
closing it

@afedulov
Copy link
Owner

afedulov commented Aug 27, 2022

@ravening thanks for bringing up the issue. I updated the setup to compile on M1 silicon and adjusted the project to work with Flink 1.15. Please checkout this branch: https://github.com/afedulov/fraud-detection-demo/tree/with-1.15 . Please note that there are still some leftovers from the older deprecated APIs, but everything still works, just might need some slight additional updates to make it up to date with the recent Flink API changes.

@afedulov afedulov reopened this Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants