Skip to content

Instantly share code, notes, and snippets.

@nebhale
Created July 28, 2020 15:55
Show Gist options
  • Save nebhale/38db0722c3e1bd6514034680b2d7a5b6 to your computer and use it in GitHub Desktop.
Save nebhale/38db0722c3e1bd6514034680b2d7a5b6 to your computer and use it in GitHub Desktop.
➜ git clone https://github.com/paketo-buildpacks/samples
Cloning into 'samples'...
remote: Enumerating objects: 357, done.
remote: Counting objects: 100% (357/357), done.
remote: Compressing objects: 100% (252/252), done.
remote: Total 357 (delta 55), reused 347 (delta 48), pack-reused 0
Receiving objects: 100% (357/357), 18.22 MiB | 12.66 MiB/s, done.
Resolving deltas: 100% (55/55), done.
➜ pack build applications/dist-zip --builder gcr.io/paketo-buildpacks/builder:base --path samples/java/dist-zip --env BP_GRADLE_BUILD_ARGUMENTS="--no-daemon -x test bootDistZip" --env BP_GRADLE_BUILT_ARTIFACT="build/distributions/*.zip"
base: Pulling from paketo-buildpacks/builder
Digest: sha256:c2f0230277ac497b69dd114a83c94b15deba0bbba5d2e393977d9766295f2f73
Status: Image is up to date for gcr.io/paketo-buildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:087a6a98ec8846e2b8d75ae1d563b0a2e0306dd04055c63e04dc6172f6ff6b9d
Status: Image is up to date for paketobuildpacks/run:base-cnb
===> DETECTING
6 of 16 buildpacks participating
paketo-buildpacks/bellsoft-liberica 2.11.0
paketo-buildpacks/gradle 2.1.0
paketo-buildpacks/executable-jar 2.0.2
paketo-buildpacks/apache-tomcat 1.4.0
paketo-buildpacks/dist-zip 1.3.8
paketo-buildpacks/spring-boot 2.3.0
===> ANALYZING
Skipping buildpack layer analysis
===> BUILDING
Paketo BellSoft Liberica Buildpack 2.11.0
https://github.com/paketo-buildpacks/bellsoft-liberica
Build Configuration:
$BP_JVM_VERSION 11.* the Java version
Launch Configuration:
$BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
$BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
$BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
BellSoft Liberica JDK 11.0.8: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jdk11.0.8+10-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jdk
Adding 127 container CA certificates to JVM truststore
Writing env.build/JAVA_HOME.override
Writing env.build/JDK_HOME.override
BellSoft Liberica JRE 11.0.8: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jre11.0.8+10-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jre
Writing env.launch/JAVA_HOME.override
Writing env.launch/MALLOC_ARENA_MAX.override
Writing profile.d/active-processor-count.sh
Memory Calculator 4.1.0: Contributing to layer
Downloading from https://github.com/cloudfoundry/java-buildpack-memory-calculator/releases/download/v4.1.0/memory-calculator-4.1.0.tgz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/memory-calculator
Writing profile.d/memory-calculator.sh
Class Counter: Contributing to layer
Copying to /layers/paketo-buildpacks_bellsoft-liberica/class-counter
JVMKill Agent 1.16.0: Contributing to layer
Downloading from https://github.com/cloudfoundry/jvmkill/releases/download/v1.16.0.RELEASE/jvmkill-1.16.0-RELEASE.so
Verifying checksum
Copying to /layers/paketo-buildpacks_bellsoft-liberica/jvmkill
Writing env.launch/JAVA_OPTS.append
Link-Local DNS: Contributing to layer
Copying to /layers/paketo-buildpacks_bellsoft-liberica/link-local-dns
Writing profile.d/link-local-dns.sh
Java Security Properties: Contributing to layer
Writing env.launch/JAVA_OPTS.append
Writing env.launch/JAVA_SECURITY_PROPERTIES.override
Security Providers Configurer: Contributing to layer
Copying to /layers/paketo-buildpacks_bellsoft-liberica/security-providers-configurer
Writing profile.d/security-providers-classpath.sh
Writing profile.d/security-providers-configurer.sh
OpenSSL Certificate Loader: Contributing to layer
Copying to /layers/paketo-buildpacks_bellsoft-liberica/openssl-security-provider
Writing profile.d/openssl-certificate-loader.sh
Paketo Gradle Buildpack 2.1.0
https://github.com/paketo-buildpacks/gradle
Build Configuration:
$BP_GRADLE_BUILD_ARGUMENTS --no-daemon -x test bootDistZip the arguments to pass to Maven
$BP_GRADLE_BUILT_ARTIFACT build/distributions/*.zip the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
$BP_GRADLE_BUILT_MODULE the module to find application artifact in
Creating cache directory /home/cnb/.gradle
Compiled Application: Contributing to layer
Executing gradlew --no-daemon -x test bootDistZip
Downloading https://services.gradle.org/distributions/gradle-6.4-bin.zip
.........10%..........20%..........30%..........40%.........50%..........60%..........70%..........80%.........90%..........100%
Welcome to Gradle 6.4!
Here are the highlights of this release:
- Support for building, testing and running Java Modules
- Precompiled script plugins for Groovy DSL
- Single dependency lock file per project
For more details see https://docs.gradle.org/6.4/release-notes.html
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.4/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Task :compileJava
> Task :processResources
> Task :classes
> Task :bootJar
> Task :bootStartScripts
> Task :bootDistZip
BUILD SUCCESSFUL in 58s
5 actionable tasks: 5 executed
Removing source code
Paketo DistZip Buildpack 1.3.8
https://github.com/paketo-buildpacks/dist-zip
Build Configuration:
$BP_APPLICATION_SCRIPT */bin/* the application start script
Process types:
dist-zip: /workspace/demo-boot-0.0.1-SNAPSHOT/bin/demo
task: /workspace/demo-boot-0.0.1-SNAPSHOT/bin/demo
web: /workspace/demo-boot-0.0.1-SNAPSHOT/bin/demo
===> EXPORTING
Reusing layer 'launcher'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:class-counter'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:jre'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:jvmkill'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:link-local-dns'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:memory-calculator'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:openssl-security-provider'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:security-providers-configurer'
Adding 1/1 app layer(s)
Adding layer 'config'
*** Images (898524f94f90):
index.docker.io/applications/dist-zip:latest
Adding cache layer 'paketo-buildpacks/bellsoft-liberica:jdk'
Adding cache layer 'paketo-buildpacks/gradle:application'
Adding cache layer 'paketo-buildpacks/gradle:cache'
Successfully built image applications/dist-zip
Time: 0h:01m:52s
➜ docker run -t -p 8080:8080 -m 1G applications/dist-zip
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=61805K -XX:ReservedCodeCacheSize=240M -Xss1M -Xmx474770K (Head Room: 0%, Loaded Class Count: 8498, Thread Count: 250, Total Memory: 1.0G)
Adding 127 container CA certificates to JVM truststore
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.0.RELEASE)
2020-07-28 15:55:40.406 INFO 1 --- [ main] io.paketo.demo.DemoApplication : Starting DemoApplication on ec5b73927560 with PID 1 (/workspace/demo-boot-0.0.1-SNAPSHOT/lib/demo-0.0.1-SNAPSHOT.jar started by cnb in /workspace)
2020-07-28 15:55:40.410 INFO 1 --- [ main] io.paketo.demo.DemoApplication : No active profile set, falling back to default profiles: default
2020-07-28 15:55:42.159 INFO 1 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-07-28 15:55:42.685 INFO 1 --- [ main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port(s): 8080
2020-07-28 15:55:42.707 INFO 1 --- [ main] io.paketo.demo.DemoApplication : Started DemoApplication in 2.972 seconds (JVM running for 3.643)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment