fini TP1
This commit is contained in:
27
step1.2/dockerfile
Normal file
27
step1.2/dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
# https://launchpad.net/ubuntu/xenial/arm64/libjasper1
|
||||
# Il est compatible pour 16.04, merci :)
|
||||
FROM ubuntu:16.04 AS build
|
||||
|
||||
WORKDIR /stage1
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y openjdk-8-jdk maven libpng16-16 libjasper1 libdc1394-22
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN mvn install:install-file -Dfile=./lib/opencv-3410.jar -DgroupId=org.opencv -DartifactId=opencv -Dversion=3.4.10 -Dpackaging=jar
|
||||
|
||||
RUN mvn package
|
||||
|
||||
FROM eclipse-temurin:8-jre-jammy
|
||||
|
||||
WORKDIR /stage2
|
||||
#COPY --from=build /stage1/lib/ubuntuupperthan18/libopencv_java3410.so /stage2/lib/ubuntuupperthan18/libopencv_java3410.so
|
||||
COPY --from=build /stage1/lib/ /stage2/lib/
|
||||
COPY --from=build /stage1/target/fatjar-0.0.1-SNAPSHOT.jar /stage2/target/fatjar-0.0.1-SNAPSHOT.jar
|
||||
COPY --from=build /stage1/haarcascades /stage2/haarcascades/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["java","-Djava.library.path=/stage2/lib/ubuntuupperthan18/", "-jar", "target/fatjar-0.0.1-SNAPSHOT.jar"]
|
||||
|
||||
Reference in New Issue
Block a user