diff --git a/layoutparser-service/layoutparser-service-server/build.gradle.kts b/layoutparser-service/layoutparser-service-server/build.gradle.kts index 33edc12..c6b6e7a 100644 --- a/layoutparser-service/layoutparser-service-server/build.gradle.kts +++ b/layoutparser-service/layoutparser-service-server/build.gradle.kts @@ -71,10 +71,31 @@ sonarqube { tasks.named("bootBuildImage") { - println("--------------------" + layout.projectDirectory.file( "src/main/resources/Aptfile").toString()); - var aptfilePath = layout.projectDirectory.file( "src/main/resources/Aptfile").toString() // make sure this path is valid because there will be no log or exception if not - bindings.add("${aptfilePath}:/workspace/Aptfile:ro") - buildpacks.set(listOf("ghcr.io/fagiani/buildpacks/fagiani_apt@sha256:6471c8c70f32b749e29f65ae562ac0339fecad26aa9217628c00a6c31f197dae", "urn:cnb:builder:paketo-buildpacks/java")) +// environment.put("BP_ACCEPT_EULA","Y") +//// println("--------------------" + layout.projectDirectory.file( "src/main/resources/Aptfile").toString()); +// var aptfilePath = layout.projectDirectory.file( "src/main/resources/Aptfile").toString() // make sure this path is valid because there will be no log or exception if not +// bindings.add("${aptfilePath}:/workspace/Aptfile:ro") +// buildpacks.set(listOf("ghcr.io/fagiani/buildpacks/fagiani_apt@sha256:6471c8c70f32b749e29f65ae562ac0339fecad26aa9217628c00a6c31f197dae", "urn:cnb:builder:paketo-buildpacks/java")) + + +// environment.put("BP_LOG_LEVEL","DEBUG") +// var aptfilePath = layout.projectDirectory.file( "src/main/resources/Aptfile").toString() // make sure this path is valid because there will be no log or exception if not +// bindings.add("${aptfilePath}:/workspace/Aptfile:ro") +// var shfilePath = layout.projectDirectory.file( "src/main/resources/buildpack-run.sh").toString() // make sure this path is valid because there will be no log or exception if not +// bindings.add("${shfilePath}:/workspace/buildpack-run.sh:ro") +// buildpacks.set(listOf("ghcr.io/fagiani/buildpacks/fagiani_run@sha256:5c75bf651072e1ad345aa148433b8cdd373e97f9b29523ceaeaf1c39f1691985", "ghcr.io/fagiani/buildpacks/fagiani_apt@sha256:6471c8c70f32b749e29f65ae562ac0339fecad26aa9217628c00a6c31f197dae","urn:cnb:builder:paketo-buildpacks/java")) + + var fontsfilePath = layout.projectDirectory.file( "src/main/resources/fonts.tar.gz").toString() // make sure this path is valid because there will be no log or exception if not + bindings.add("${fontsfilePath}:/workspace/fonts.tar.gz:ro") + + var shfilePath = layout.projectDirectory.file( "src/main/resources/buildpack-run.sh").toString() // make sure this path is valid because there will be no log or exception if not + bindings.add("${shfilePath}:/workspace/buildpack-run.sh:ro") + buildpacks.set(listOf("ghcr.io/fagiani/buildpacks/fagiani_run@sha256:5c75bf651072e1ad345aa148433b8cdd373e97f9b29523ceaeaf1c39f1691985", "urn:cnb:builder:paketo-buildpacks/java")) + + + + + imageName.set("nexus.knecon.com:5001/ff/${project.name}:${project.version}") if (project.hasProperty("buildbootDockerHostNetwork")) { diff --git a/layoutparser-service/layoutparser-service-server/src/main/resources/Aptfile b/layoutparser-service/layoutparser-service-server/src/main/resources/Aptfile index 0ff3ea4..32345ab 100644 --- a/layoutparser-service/layoutparser-service-server/src/main/resources/Aptfile +++ b/layoutparser-service/layoutparser-service-server/src/main/resources/Aptfile @@ -3,9 +3,12 @@ ghostscript cabextract xfonts-utils fonts-liberation +lmodern +ttf-mscorefonts-installer + # or include links to specific .deb files -http://ftp.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb +# http://ftp.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb # or add custom apt repos (only required if using packages outside of the standard Ubuntu APT repositories) # :repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe \ No newline at end of file diff --git a/layoutparser-service/layoutparser-service-server/src/main/resources/buildpack-run.sh b/layoutparser-service/layoutparser-service-server/src/main/resources/buildpack-run.sh new file mode 100755 index 0000000..6c023d6 --- /dev/null +++ b/layoutparser-service/layoutparser-service-server/src/main/resources/buildpack-run.sh @@ -0,0 +1 @@ +tar -xf fonts.tar.gz \ No newline at end of file diff --git a/layoutparser-service/layoutparser-service-server/src/main/resources/fonts.tar.gz b/layoutparser-service/layoutparser-service-server/src/main/resources/fonts.tar.gz new file mode 100644 index 0000000..2ca1fac Binary files /dev/null and b/layoutparser-service/layoutparser-service-server/src/main/resources/fonts.tar.gz differ