标签: paketo

如何为 `mvn spring-boot:build-image` 覆盖 paketo-buildpacks/bellsoft-liberica

我想使用 Spring Boot 的构建映像目标创建具有不同 JVM 基础的 OCI 映像。但是,我很难找到覆盖 JVM 的文档。谁能告诉我如何只覆盖 JVM 变体“paketo-buildpacks/adoptium”?

我的 pom 文件如下所示。

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <image>
                    <builder>jfrog.mycompany.com/paketobuildpacks/builder:base</builder>
                    <runImage>jfrog.mycompany.com/paketobuildpacks/run:base-cnb</runImage>
                </image>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

我尝试检查 Spring boot 插件以及 paketo 文档。但没有直接的示例或说明。

buildpack spring-boot paketo

3
推荐指数
1
解决办法
937
查看次数

使用 Paketo Buildpacks 容器化 Angular 应用程序:空回复

我想使用 Nodejs 的 Paketo 构建包创建 Angular 12 应用程序的容器映像。我通过 Angular CLI 创建了该应用程序并对其进行了编码,直到现在我想要部署它。

\n

为了创建容器,我按照 paketo 示例存储库中的说明操作并运行以下命令:

\n
pack build myui --buildpack gcr.io/paketo-buildpacks/nodejs --env "BP_NODE_RUN_SCRIPTS=build" --env "NODE_ENV=development"\n
Run Code Online (Sandbox Code Playgroud)\n

只要我在运行之前删除 node_modules 目录,这就可以正常工作pack

\n

现在我想在本地测试图像并尝试启动它

\n
docker run --tty --publish 4200:4200 myui\n
Run Code Online (Sandbox Code Playgroud)\n

看来启动成功了:

\n
\xe2\x9c\x94 Browser application bundle generation complete.\n\nInitial Chunk Files | Names         |      Size\nmain.js             | main          |   6.14 MB\nvendor.js           | vendor        |   4.22 MB\nstyles.css          | styles        | 159.33 kB\npolyfills.js        | polyfills     | 128.67 kB\nruntime.js          | runtime       |   6.56 kB\n\n …
Run Code Online (Sandbox Code Playgroud)

node.js buildpack angular paketo

1
推荐指数
1
解决办法
1991
查看次数

云原生构建包只是执行多阶段容器映像构建的自动方式吗?

我开始使用pack为我的应用程序构建容器映像。我对不同的应用程序使用了不同的构建器:用于 Node.js 应用程序的gcr.io/buildpacks/builder和paketobuildpacks/builder:tiny和用于 Clojure 应用程序的

不必编写 Dockerfile 很棒,但我仍然不确定云原生 Buildpack 是如何工作的。构建包只是一堆可执行文件(由构建器运行),它们与手动编写 Docker多阶段构建FROM(即Dockerfile 中的多个指令)的开发人员实现相同的结果吗?

containers pack buildpack docker paketo

1
推荐指数
1
解决办法
690
查看次数

Cloud Native Buildpacks/Paketo with Java/Spring Boot:如何配置不同的 JDK 下载 uri(例如无法访问 github.com)

拥有一个 Spring Boot 应用程序,我尝试使用spring-boot-maven-plugin目标来构建它mvn spring-boot:build-image。但是构建无法下载bellsoft-jre11.0.9.1+1-linux-amd64.tar.gzfrom github.com,因为我无法从构建管道访问它:

...
Paketo BellSoft Liberica Buildpack 5.2.1
  https://github.com/paketo-buildpacks/bellsoft-liberica
  Build Configuration:
    $BP_JVM_VERSION              11.0.9          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.9: Contributing to layer
    Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.9.1+1/bellsoft-jdk11.0.9.1+1-linux-amd64.tar.gz
unable to invoke layer creator
unable to get …
Run Code Online (Sandbox Code Playgroud)

java spring buildpack spring-boot paketo

0
推荐指数
1
解决办法
1680
查看次数

通过 Spring Boot 的 maven 插件中的绑定添加 CA 证书失败,因为“无法读取绑定‘ca-certificates’:缺少‘type’”

按照此处的建议,这些建议是如何使用 Spring Boot 的 maven 插件将 SSL 证书传递到构建映像中。

  • 我的 pom.xml 中有这个:
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
    <image>
        <bindings>
        <binding>${basedir}/bindings/certificates:/platform/bindings/ca-certificates</binding>
        </bindings>
    </image>
    </configuration>
</plugin> 
Run Code Online (Sandbox Code Playgroud)
$ cat bindings/certificates/type 
ca-certificates
Run Code Online (Sandbox Code Playgroud)
  • 但是,我收到此错误:
$ ./mvnw spring-boot:build-image
...
...
...
[INFO]  > Running creator
[INFO]     [creator]     ===> ANALYZING
[INFO]     [creator]     Restoring data for SBOM from previous image
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     ======== Output: paketo-buildpacks/git@1.0.1 ========
[INFO]     [creator]     failed to load bindings from '/platform/bindings': failed to read binding …
Run Code Online (Sandbox Code Playgroud)

spring maven-plugin maven spring-boot paketo

0
推荐指数
1
解决办法
1008
查看次数