Github Asset Buildpackを使ってCloud Native Buildpacksで作成するイメージにGithub Releasesの任意のバイナリを追加する
"Tanzu Build ServiceのCustom Stackを使ってCloud Native BuildpacksのStackにaptのパッケージを追加する" ではStackにaptのパッケージを追加する方法を紹介しました。 今度はGithubのReleaseページで公開されている任意ののバイナリをダウンロードしてイメージに追加する方法を紹介します。 今回はStackではなく、Buildpackを追加することでバイナリを追加するので、Stackは既存のものがそのまま使えます。また、Tanzu Build ServiceでなくともPack CLIでも利用可能な方法です。
使うのは有志が作成している Github Asset Buildpack です。
使い方はREADMEの通りですが、ビルド時にcage1016/github-assets-cnb@2.1.1 buildpackを追加します。
"Building a RESTful Web Service" のチュートリアルアプリをビルドします。
git clone https://github.com/spring-guides/gs-rest-service.git
cd gs-rest-service/complete
rm -rf build.gradle gradle* settings.gradle
このアプリのDokcer Imageにyj CLIをインストールします。
インストールしたいGithub Assetsをproject.tomlに次のように記述します。
cat <<EOF > project.toml
[[metadata.githubassets]]
repo = "sclevine/yj"
asset = "yj-linux"
destination = "bin/yj"
EOF
Pack CLIで使う
paketobuildpacks/builder:base Builderのpaketo-buildpacks/java Buildpackに加えてcage1016/github-assets-cnbを使用するので、実行するコマンドは次のようになります。
pack build making/rest-service \
--builder paketobuildpacks/builder:base \
--buildpack paketo-buildpacks/java \
--buildpack cage1016/github-assets-cnb
実行結果のログは次の通りです。
base: Pulling from paketobuildpacks/builder
Digest: sha256:4fae5e2abab118ca9a37bf94ab42aa17fef7c306296b0364f5a0e176702ab5cb
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:8ee09c6154a8c9a99f5da07c317102f5c29ad9b1bf2b7742799eb51d9f1a2e56
Status: Image is up to date for paketobuildpacks/run:base-cnb
ghcr.io/cage1016/buildpacks/cage1016_github-assets-cnb@sha256:0ab52bbdfca1a94f554165928aee6304dbfb9461ff5a2e73008c0eeedd6aa550: Pulling from cage1016/buildpacks/cage1016_github-assets-cnb
c7da4b85ca55: Pull complete
Digest: sha256:0ab52bbdfca1a94f554165928aee6304dbfb9461ff5a2e73008c0eeedd6aa550
Status: Downloaded newer image for ghcr.io/cage1016/buildpacks/cage1016_github-assets-cnb@sha256:0ab52bbdfca1a94f554165928aee6304dbfb9461ff5a2e73008c0eeedd6aa550
===> DETECTING
8 of 19 buildpacks participating
paketo-buildpacks/ca-certificates 2.3.2
paketo-buildpacks/bellsoft-liberica 8.2.0
paketo-buildpacks/maven 5.3.2
paketo-buildpacks/executable-jar 5.1.2
paketo-buildpacks/apache-tomcat 5.6.1
paketo-buildpacks/dist-zip 4.1.2
paketo-buildpacks/spring-boot 4.4.2
cage1016/github-assets-cnb 2.1.1
===> ANALYZING
Previous image with name "making/rest-service" not found
===> RESTORING
===> BUILDING
Paketo CA Certificates Buildpack 2.3.2
https://github.com/paketo-buildpacks/ca-certificates
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
Paketo BellSoft Liberica Buildpack 8.2.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
$JAVA_TOOL_OPTIONS the JVM launch flags
BellSoft Liberica JDK 11.0.12: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jdk11.0.12+7-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jdk
Adding 129 container CA certificates to JVM truststore
Writing env.build/JAVA_HOME.override
Writing env.build/JDK_HOME.override
BellSoft Liberica JRE 11.0.12: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jre11.0.12+7-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jre
Adding 129 container CA certificates to JVM truststore
Writing env.launch/BPI_APPLICATION_PATH.default
Writing env.launch/BPI_JVM_CACERTS.default
Writing env.launch/BPI_JVM_CLASS_COUNT.default
Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
Writing env.launch/JAVA_HOME.default
Writing env.launch/MALLOC_ARENA_MAX.default
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/active-processor-count
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/java-opts
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/link-local-dns
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/openssl-certificate-loader
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-configurer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-classpath-9
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_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Java Security Properties: Contributing to layer
Writing env.launch/JAVA_SECURITY_PROPERTIES.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Paketo Maven Buildpack 5.3.2
https://github.com/paketo-buildpacks/maven
Build Configuration:
$BP_MAVEN_BUILD_ARGUMENTS -Dmaven.test.skip=true package the arguments to pass to Maven
$BP_MAVEN_BUILT_ARTIFACT target/*.[jw]ar the built application artifact explicitly. Supersedes $BP_MAVEN_BUILT_MODULE
$BP_MAVEN_BUILT_MODULE the module to find application artifact in
Creating cache directory /home/cnb/.m2
Compiled Application: Contributing to layer
Executing mvnw --batch-mode -Dmaven.test.skip=true package
[INFO] Scanning for projects...
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:06 min
[INFO] Finished at: 2021-08-08T17:19:08Z
[INFO] ------------------------------------------------------------------------
Removing source code
Paketo Executable JAR Buildpack 5.1.2
https://github.com/paketo-buildpacks/executable-jar
Class Path: Contributing to layer
Writing env/CLASSPATH.delim
Writing env/CLASSPATH.prepend
Process types:
executable-jar: java org.springframework.boot.loader.JarLauncher (direct)
task: java org.springframework.boot.loader.JarLauncher (direct)
web: java org.springframework.boot.loader.JarLauncher (direct)
Paketo Spring Boot Buildpack 4.4.2
https://github.com/paketo-buildpacks/spring-boot
Creating slices from layers index
dependencies
spring-boot-loader
snapshot-dependencies
application
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_spring-boot/helper/exec.d/spring-cloud-bindings
Spring Cloud Bindings 1.7.1: Contributing to layer
Downloading from https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.7.1/spring-cloud-bindings-1.7.1.jar
Verifying checksum
Copying to /layers/paketo-buildpacks_spring-boot/spring-cloud-bindings
Web Application Type: Contributing to layer
Servlet web application detected
Writing env.launch/BPL_JVM_THREAD_COUNT.default
4 application slices
Image labels:
org.opencontainers.image.title
org.opencontainers.image.version
org.springframework.boot.version
Download: https://api.github.com/repos/sclevine/yj/releases/assets/23237128
Deliver: yj-linux -> /layers/cage1016_github-assets-cnb/sclevine_yj/bin/yj
===> EXPORTING
Adding layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
Adding layer 'paketo-buildpacks/bellsoft-liberica:jre'
Adding layer 'paketo-buildpacks/bellsoft-liberica:jvmkill'
Adding layer 'paketo-buildpacks/executable-jar:classpath'
Adding layer 'paketo-buildpacks/spring-boot:helper'
Adding layer 'paketo-buildpacks/spring-boot:spring-cloud-bindings'
Adding layer 'paketo-buildpacks/spring-boot:web-application-type'
Adding layer 'cage1016/github-assets-cnb:sclevine_yj'
Adding 5/5 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Adding label 'org.opencontainers.image.title'
Adding label 'org.opencontainers.image.version'
Adding label 'org.springframework.boot.version'
Setting default process type 'web'
Saving making/rest-service...
*** Images (b6327396e57f):
making/rest-service
Adding cache layer 'paketo-buildpacks/bellsoft-liberica:jdk'
Adding cache layer 'paketo-buildpacks/maven:application'
Adding cache layer 'paketo-buildpacks/maven:cache'
Successfully built image making/rest-service
ログからyj-linuxがダウンロードされ、/layers/cage1016_github-assets-cnb/sclevine_yj/bin/yjへ保存されていることがわかります。
実際に作成されたイメージを実行して追加したバイナリを確認します。
$ docker run --rm --entrypoint bash making/rest-service -c '/layers/cage1016_github-assets-cnb/sclevine_yj/bin/yj -v'
v5.0.0
yjのバージョンが出力されたので、yjコマンドが実行できる状態であることがわかります。
kpack / Tanzu Build Serviceで使う
次にkpackで追加buildpackを使う方法を紹介します。この例では実際にはTanzu Build Serviceを使用していますが、オープンソースのkpackでも同じです。
kp CLIを使って ClusterStore を作成します。
次のコマンドでjava buildpackとgithub-assets-cnb buildpackからのみ成るClusterStoreを作成します。
kp clusterstore save java-github-assets \
-b harbor.orange.maki.lol/tanzu-build-service/build-service/tanzu-buildpacks_java:latest \
-b ghcr.io/cage1016/buildpacks/cage1016_github-assets-cnb:latest
作成したClusterStoreを確認します。
$ kp clusterstore status java-github-assets
Status: Ready
BUILDPACKAGE ID VERSION HOMEPAGE
cage1016/github-assets-cnb 2.1.1 https://github.com/cage1016/github-assets-cnb
tanzu-buildpacks/java 5.12.0 https://github.com/pivotal-cf/tanzu-java
次にこのClusterStoreと使用する ClusterStack を組み合わせて ClusterBuilder を作成します。
kp clusterbuilder save java-github-assets \
--stack base \
--store java-github-assets \
--buildpack tanzu-buildpacks/java \
--buildpack cage1016/github-assets-cnb
作成したClusterBuilderを確認します。
$ kp clusterbuilder status java-github-assets
Status: Ready
Image: harbor.orange.maki.lol/tanzu-build-service/build-service/java-github-assets@sha256:ff2b305be8610038075517aed458e87f5f56c36d9572e35e86a42c7bf74954c6
Stack: io.buildpacks.stacks.bionic
Run Image: harbor.orange.maki.lol/tanzu-build-service/build-service/run@sha256:8ee09c6154a8c9a99f5da07c317102f5c29ad9b1bf2b7742799eb51d9f1a2e56
BUILDPACK ID VERSION HOMEPAGE
paketo-buildpacks/bellsoft-liberica 8.2.0 https://github.com/paketo-buildpacks/bellsoft-liberica
tanzu-buildpacks/apache-skywalking 3.4.0 https://github.com/pivotal-cf/tanzu-apache-skywalking
tanzu-buildpacks/appdynamics 3.5.0 https://github.com/pivotal-cf/tanzu-appdynamics
tanzu-buildpacks/jprofiler 3.3.0 https://github.com/pivotal-cf/tanzu-jprofiler
paketo-buildpacks/gradle 5.4.0 https://github.com/paketo-buildpacks/gradle
tanzu-buildpacks/new-relic 3.8.0 https://github.com/pivotal-cf/tanzu-new-relic
tanzu-buildpacks/overops 3.8.0 https://github.com/pivotal-cf/tanzu-overops
paketo-buildpacks/apache-tomcat 6.0.0 https://github.com/paketo-buildpacks/apache-tomcat
tanzu-buildpacks/jrebel 3.5.0 https://github.com/pivotal-cf/tanzu-jrebel
paketo-buildpacks/azure-application-insights 4.5.0 https://github.com/paketo-buildpacks/azure-application-insights
paketo-buildpacks/sbt 5.4.0 https://github.com/paketo-buildpacks/sbt
tanzu-buildpacks/contrast-security 3.6.0 https://github.com/pivotal-cf/tanzu-contrast-security
paketo-buildpacks/maven 5.3.3 https://github.com/paketo-buildpacks/maven
tanzu-buildpacks/elastic-apm 3.8.0 https://github.com/pivotal-cf/tanzu-elastic-apm
paketo-buildpacks/google-stackdriver 3.11.2 https://github.com/paketo-buildpacks/google-stackdriver
tanzu-buildpacks/yourkit 3.5.1 https://github.com/pivotal-cf/tanzu-yourkit
tanzu-buildpacks/dynatrace 3.1.1 https://github.com/pivotal-cf/tanzu-dynatrace
paketo-buildpacks/spring-boot 4.4.2 https://github.com/paketo-buildpacks/spring-boot
tanzu-buildpacks/jacoco 3.1.1 https://github.com/pivotal-cf/tanzu-jacoco
tanzu-buildpacks/synopsys 3.1.1 https://github.com/pivotal-cf/tanzu-synopsys
paketo-buildpacks/ca-certificates 2.3.2 https://github.com/paketo-buildpacks/ca-certificates
paketo-buildpacks/procfile 4.2.2 https://github.com/paketo-buildpacks/procfile
tanzu-buildpacks/checkmarx 3.1.1 https://github.com/pivotal-cf/tanzu-checkmarx
paketo-buildpacks/encrypt-at-rest 3.1.2 https://github.com/paketo-buildpacks/encrypt-at-rest
paketo-buildpacks/debug 3.1.2 https://github.com/paketo-buildpacks/debug
paketo-buildpacks/leiningen 3.2.2 https://github.com/paketo-buildpacks/leiningen
paketo-buildpacks/jmx 3.1.2 https://github.com/paketo-buildpacks/jmx
tanzu-buildpacks/snyk 3.1.1 https://github.com/pivotal-cf/tanzu-snyk
cage1016/github-assets-cnb 2.1.1 https://github.com/cage1016/github-assets-cnb
paketo-buildpacks/executable-jar 5.1.2 https://github.com/paketo-buildpacks/executable-jar
tanzu-buildpacks/aspectj 3.1.1 https://github.com/pivotal-cf/tanzu-aspectj
paketo-buildpacks/environment-variables 3.1.1 https://github.com/paketo-buildpacks/environment-variables
paketo-buildpacks/image-labels 3.1.2 https://github.com/paketo-buildpacks/image-labels
paketo-buildpacks/dist-zip 4.1.2 https://github.com/paketo-buildpacks/dist-zip
tanzu-buildpacks/java 5.12.0 https://github.com/pivotal-cf/tanzu-java
DETECTION ORDER
Group #1
tanzu-buildpacks/java@5.12.0
cage1016/github-assets-cnb@2.1.1
次にこのClusterBuilderを使用してソースからイメージを作成します。
kp image save rest-service \
--tag harbor.orange.maki.lol/library/rest-service \
--cluster-builder java-github-assets \
--git https://github.com/making/gs-rest-service.git \
--git-revision main \
--sub-path complete \
--wait
実行結果のログは次の通りです。
Creating Image...
Image "rest-service" created
===> PREPARE
Build reason(s): CONFIG
CONFIG:
resources: {}
- source: {}
+ source:
+ git:
+ revision: 4110d4946378cffc939ea35dc4304c7ec3178cd1
+ url: https://github.com/making/gs-rest-service.git
+ subPath: complete
Loading secret for "harbor.orange.maki.lol" from secret "harbor" at location "/var/build-secrets/harbor"
Loading secret for "https://index.docker.io/v1/" from secret "dockerhub" at location "/var/build-secrets/dockerhub"
Cloning "https://github.com/making/gs-rest-service.git" @ "4110d4946378cffc939ea35dc4304c7ec3178cd1"...
Successfully cloned "https://github.com/making/gs-rest-service.git" @ "4110d4946378cffc939ea35dc4304c7ec3178cd1" in path "/workspace"
===> DETECT
8 of 34 buildpacks participating
paketo-buildpacks/ca-certificates 2.3.2
paketo-buildpacks/bellsoft-liberica 8.2.0
paketo-buildpacks/maven 5.3.3
paketo-buildpacks/executable-jar 5.1.2
paketo-buildpacks/apache-tomcat 6.0.0
paketo-buildpacks/dist-zip 4.1.2
paketo-buildpacks/spring-boot 4.4.2
cage1016/github-assets-cnb 2.1.1
===> ANALYZE
Previous image with name "harbor.orange.maki.lol/library/rest-service" not found
===> RESTORE
===> BUILD
Paketo CA Certificates Buildpack 2.3.2
https://github.com/paketo-buildpacks/ca-certificates
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
Paketo BellSoft Liberica Buildpack 8.2.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
$JAVA_TOOL_OPTIONS the JVM launch flags
BellSoft Liberica JDK 11.0.12: Contributing to layer
Reusing cached download from buildpack
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jdk
Adding 129 container CA certificates to JVM truststore
Writing env.build/JAVA_HOME.override
Writing env.build/JDK_HOME.override
BellSoft Liberica JRE 11.0.12: Contributing to layer
Reusing cached download from buildpack
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jre
Adding 129 container CA certificates to JVM truststore
Writing env.launch/BPI_APPLICATION_PATH.default
Writing env.launch/BPI_JVM_CACERTS.default
Writing env.launch/BPI_JVM_CLASS_COUNT.default
Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
Writing env.launch/JAVA_HOME.default
Writing env.launch/MALLOC_ARENA_MAX.default
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/active-processor-count
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/java-opts
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/link-local-dns
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/openssl-certificate-loader
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-configurer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-classpath-9
JVMKill Agent 1.16.0: Contributing to layer
Reusing cached download from buildpack
Copying to /layers/paketo-buildpacks_bellsoft-liberica/jvmkill
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Java Security Properties: Contributing to layer
Writing env.launch/JAVA_SECURITY_PROPERTIES.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Paketo Maven Buildpack 5.3.3
https://github.com/paketo-buildpacks/maven
Build Configuration:
$BP_MAVEN_BUILD_ARGUMENTS -Dmaven.test.skip=true package the arguments to pass to Maven
$BP_MAVEN_BUILT_ARTIFACT target/*.[jw]ar the built application artifact explicitly. Supersedes $BP_MAVEN_BUILT_MODULE
$BP_MAVEN_BUILT_MODULE the module to find application artifact in
Creating cache directory /home/cnb/.m2
Compiled Application: Contributing to layer
Executing mvnw --batch-mode -Dmaven.test.skip=true package
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:51 min
[INFO] Finished at: 2021-08-08T18:28:13Z
[INFO] ------------------------------------------------------------------------
Removing source code
Paketo Executable JAR Buildpack 5.1.2
https://github.com/paketo-buildpacks/executable-jar
Class Path: Contributing to layer
Writing env/CLASSPATH.delim
Writing env/CLASSPATH.prepend
Process types:
executable-jar: java org.springframework.boot.loader.JarLauncher (direct)
task: java org.springframework.boot.loader.JarLauncher (direct)
web: java org.springframework.boot.loader.JarLauncher (direct)
Paketo Spring Boot Buildpack 4.4.2
https://github.com/paketo-buildpacks/spring-boot
Creating slices from layers index
dependencies
spring-boot-loader
snapshot-dependencies
application
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_spring-boot/helper/exec.d/spring-cloud-bindings
Spring Cloud Bindings 1.7.1: Contributing to layer
Reusing cached download from buildpack
Copying to /layers/paketo-buildpacks_spring-boot/spring-cloud-bindings
Web Application Type: Contributing to layer
Servlet web application detected
Writing env.launch/BPL_JVM_THREAD_COUNT.default
4 application slices
Image labels:
org.opencontainers.image.title
org.opencontainers.image.version
org.springframework.boot.version
Download: https://api.github.com/repos/sclevine/yj/releases/assets/23237128
Deliver: yj-linux -> /layers/cage1016_github-assets-cnb/sclevine_yj/bin/yj
===> EXPORT
Adding layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
Adding layer 'paketo-buildpacks/bellsoft-liberica:jre'
Adding layer 'paketo-buildpacks/bellsoft-liberica:jvmkill'
Adding layer 'paketo-buildpacks/executable-jar:classpath'
Adding layer 'paketo-buildpacks/spring-boot:helper'
Adding layer 'paketo-buildpacks/spring-boot:spring-cloud-bindings'
Adding layer 'paketo-buildpacks/spring-boot:web-application-type'
Adding layer 'cage1016/github-assets-cnb:sclevine_yj'
Adding 5/5 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Adding label 'org.opencontainers.image.title'
Adding label 'org.opencontainers.image.version'
Adding label 'org.springframework.boot.version'
Setting default process type 'web'
Saving harbor.orange.maki.lol/library/rest-service...
*** Images (sha256:6e42a87f1e910f613ed8060b20bbfe7a00191b0dea9319be750225818e713d9a):
harbor.orange.maki.lol/library/rest-service
harbor.orange.maki.lol/library/rest-service:b1.20210808.182530
Adding cache layer 'paketo-buildpacks/bellsoft-liberica:jdk'
Adding cache layer 'paketo-buildpacks/maven:application'
Adding cache layer 'paketo-buildpacks/maven:cache'
===> COMPLETION
Build successful
実際に作成されたイメージを実行して追加したバイナリを確認します。
$ docker run --rm --entrypoint bash harbor.orange.maki.lol/library/rest-service -c '/layers/cage1016_github-assets-cnb/sclevine_yj/bin/yj -v'
v5.0.0
yjのバージョンが出力されたので、yjコマンドが実行できる状態であることがわかります。