Fini TP1
This commit is contained in:
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
nginx-proxy:
|
||||||
|
image: jwilder/nginx-proxy
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/tmp/docker.sock
|
||||||
|
|
||||||
|
virtual-host:
|
||||||
|
image: nginx
|
||||||
|
environment:
|
||||||
|
- VIRTUAL_HOST=m
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 4
|
||||||
14
step1.1/dockerfile
Normal file
14
step1.1/dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#Tache 1.1
|
||||||
|
FROM scratch
|
||||||
|
WORKDIR /
|
||||||
|
COPY hello_dyn /
|
||||||
|
COPY lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
|
||||||
|
COPY lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
|
||||||
|
CMD ["/hello_dyn"]
|
||||||
|
|
||||||
|
#Tache 1.2
|
||||||
|
COPY hello /
|
||||||
|
CMD ["/hello"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BIN
step1.1/hello
BIN
step1.1/hello
Binary file not shown.
BIN
step1.1/hello_dyn
Executable file
BIN
step1.1/hello_dyn
Executable file
Binary file not shown.
BIN
step1.1/lib/x86_64-linux-gnu/libc.so.6
Executable file
BIN
step1.1/lib/x86_64-linux-gnu/libc.so.6
Executable file
Binary file not shown.
BIN
step1.1/lib64/ld-linux-x86-64.so.2
Executable file
BIN
step1.1/lib64/ld-linux-x86-64.so.2
Executable file
Binary file not shown.
9
step1.1/readme
Normal file
9
step1.1/readme
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
>ldd hello_dyn
|
||||||
|
linux-vdso.so.1 (0x00007da294360000)
|
||||||
|
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007da294000000)
|
||||||
|
/lib64/ld-linux-x86-64.so.2 (0x00007da294362000)
|
||||||
|
|
||||||
|
>mkdir -p lib/x86_64-linux-gnu lib64
|
||||||
|
|
||||||
|
>cp /lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/
|
||||||
|
>cp /lib64/ld-linux-x86-64.so.2 lib64/
|
||||||
21
step1.2/dockerfile-tache2
Normal file
21
step1.2/dockerfile-tache2
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
#https://github.com/linghu8812/tensorrt_inference/issues/95
|
||||||
|
RUN apt-get install software-properties-common -y
|
||||||
|
RUN add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
|
||||||
|
RUN apt-get install -y openjdk-8-jdk
|
||||||
|
RUN apt-get install -y maven
|
||||||
|
RUN apt-get install -y libpng16-16
|
||||||
|
RUN apt-get install -y libjasper1
|
||||||
|
RUN apt-get install -y libdc1394-22
|
||||||
|
|
||||||
|
WORKDIR ~/tache2
|
||||||
|
COPY . ./
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
RUN mvn install:install-file -Dfile=./lib/opencv-3410.jar -DgroupId=org.opencv -DartifactId=opencv -Dversion=3.4.10 -Dpackaging=jar
|
||||||
|
RUN mvn package
|
||||||
|
CMD ["java","-Djava.library.path=lib/ubuntuupperthan18", "-jar", "target/fatjar-0.0.1-SNAPSHOT.jar"]
|
||||||
|
|
||||||
|
|
||||||
27
step1.2/dockerfile-tache3
Normal file
27
step1.2/dockerfile-tache3
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