Closed cmoulliard closed 7 months ago
Note Pack CLI: 0.32.1 might not work with podman
: https://github.com/buildpacks/pack/issues/2000
Note Pack CLI: 0.32.1 might
Can we use 0.31.x ? @matejvasek
@cmoulliard depends what you do with pack CLI. We found out that v0.32+ is not able to build application image with podman
. But maybe it's all right for building buildpacks/builders or when daemonless is employed.
depends what you do with pack CLI.
I just try to align the versions between the different tools to be sure that they work with lifecycle 0.18
It might be ok to do update. I just wanted to point out possible issue.
I did a test locally using pack client and podman with a quarkus 3.8 project usign the following versions
pack --version
0.33.2+git-f2cffc4.build-5562
podman --version
podman version 5.0.1
That works using docker desktop
pack build ${REGISTRY_HOST}/quarkus-hello:1.0 \
--builder paketocommunity/builder-ubi-base:0.0.54 \
-e BP_NATIVE_IMAGE="false" \
-e BP_JVM_VERSION="17" \
-e BP_MAVEN_BUILT_ARTIFACT="target/quarkus-app/lib/ target/quarkus-app/*.jar target/quarkus-app/app/ target/quarkus-app/quarkus/" \
-e BP_MAVEN_BUILD_ARGUMENTS="package -DskipTests=true -Dmaven.javadoc.skip=true -Dquarkus.package.type=fast-jar" \
--volume $HOME/.m2:/home/cnb/.m2:rw \
--path .
0.0.54: Pulling from paketocommunity/builder-ubi-base
Digest: sha256:dc83387ab5968d07c56bc0852cbd931e12c0ec58b17347df2d0949069d7580bc
Status: Image is up to date for paketocommunity/builder-ubi-base:0.0.54
latest: Pulling from paketocommunity/run-ubi-base
Digest: sha256:4474ab2047fe6bab93884eb8797c4615ab131a67b4a84fcc1475ae63b50e9cb8
Status: Image is up to date for paketocommunity/run-ubi-base:latest
0.19.3: Pulling from buildpacksio/lifecycle
Digest: sha256:3184c0c4028b6ca18e851388f3dd54c10fcaea5e6f1e43cf660d0647be69d6cf
Status: Image is up to date for buildpacksio/lifecycle:0.19.3
===> ANALYZING
[analyzer] Image with name "kind-registry.local:5000/quarkus-hello:1.0" not found
===> DETECTING
[detector] Warning: Platform requested experimental feature 'Dockerfiles'
[detector] 12 of 30 buildpacks participating
[detector] paketo-community/ubi-java-extension 0.1.1
[detector] paketo-community/ubi-java-buildpack 0.1.0
[detector] paketo-buildpacks/ca-certificates 3.6.8
[detector] paketo-buildpacks/bellsoft-liberica 10.5.5
[detector] paketo-buildpacks/syft 1.45.0
[detector] paketo-buildpacks/maven 6.15.14
[detector] paketo-buildpacks/executable-jar 6.8.5
[detector] paketo-buildpacks/apache-tomcat 7.15.3
[detector] paketo-buildpacks/apache-tomee 1.8.2
[detector] paketo-buildpacks/liberty 4.0.4
[detector] paketo-buildpacks/dist-zip 5.6.10
[detector] paketo-buildpacks/spring-boot 5.27.11
[detector]
[detector] Paketo UBI Java Extension 0.1.1
[detector]
[detector] Build Configuration:
[detector] $BP_JVM_VERSION 17 the Java version
[detector] Using Java version 17 from BP_JVM_VERSION
[detector] Using UBI Java package java-17-openjdk-devel
[detector] Using UBI Java run image paketocommunity/run-java-17-ubi-base
[detector] Warning: new runtime base image 'paketocommunity/run-java-17-ubi-base' not found in run metadata
latest: Pulling from paketocommunity/run-java-17-ubi-base
Digest: sha256:516e9cbbb703954067d3d50c12e0b88e727c8f04900abe9bff2cfc252bd64ffc
Status: Image is up to date for paketocommunity/run-java-17-ubi-base:latest
===> RESTORING
===> EXTENDING (BUILD)
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Using dockerignore file: /workspace/.dockerignore"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Built cross stage deps: map[]"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Executing 0 build triggers"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Building stage 'base@sha256:6b8ad3fbeca4020c48b4763c491039e02feb0fb01ed872d6c0b4bffed9b021d8' [idx: '0', base-idx: '-1']"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Cmd: USER"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Checking for cached layer oci:/kaniko/cache/layers/cached:992393a64348ed1aceadc1082c156bc4849291ad1a60797294aba37a54d3ff8e..."
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="No cached layer found for cmd RUN echo ${build_id}"
[extender (build)] time="2024-04-11T11:31:04Z" level=info msg="Cmd: USER"
...
[extender (build)]
[extender (build)]
[extender (build)] Removing source code
[extender (build)] Restoring multiple artifacts
[extender (build)]
[extender (build)] Paketo Buildpack for Executable JAR 6.8.5
[extender (build)] https://github.com/paketo-buildpacks/executable-jar
[extender (build)]
[extender (build)] Process types:
[extender (build)] executable-jar: java -jar /workspace/quarkus-run.jar (direct)
[extender (build)] task: java -jar /workspace/quarkus-run.jar (direct)
[extender (build)] web: java -jar /workspace/quarkus-run.jar (direct)
===> EXPORTING
[exporter] Adding layer 'paketo-community/ubi-java-buildpack:ajre'
[exporter] Adding layer 'paketo-community/ubi-java-buildpack:helper'
[exporter] Adding layer 'paketo-community/ubi-java-buildpack:java-security-properties'
[exporter] Adding layer 'paketo-buildpacks/ca-certificates:helper'
[exporter] Adding layer 'buildpacksio/lifecycle:launch.sbom'
[exporter] Adding 1/1 app layer(s)
[exporter] Adding layer 'buildpacksio/lifecycle:launcher'
[exporter] Adding layer 'buildpacksio/lifecycle:config'
[exporter] Adding layer 'buildpacksio/lifecycle:process-types'
[exporter] Adding label 'io.buildpacks.lifecycle.metadata'
[exporter] Adding label 'io.buildpacks.build.metadata'
[exporter] Adding label 'io.buildpacks.project.metadata'
[exporter] Setting default process type 'web'
[exporter] Saving kind-registry.local:5000/quarkus-hello:1.0...
[exporter] *** Images (6447bf51fe34):
[exporter] kind-registry.local:5000/quarkus-hello:1.0
[exporter] Adding cache layer 'paketo-buildpacks/syft:syft'
[exporter] Adding cache layer 'paketo-buildpacks/maven:application'
[exporter] Adding cache layer 'paketo-buildpacks/maven:cache'
[exporter] Adding cache layer 'buildpacksio/lifecycle:cache.sbom'
Successfully built image kind-registry.local:5000/quarkus-hello:1.0
That fails on macos using podman
podman machine set --rootful=false
podman machine start
export DOCKER_HOST="unix://$(podman machine inspect podman-machine-default | jq -r '.[].ConnectionInfo.PodmanSocket.Path')"
pack build ${REGISTRY_HOST}/quarkus-hello:1.0 \
--builder paketocommunity/builder-ubi-base:0.0.54 \
-e BP_NATIVE_IMAGE="false" \
-e BP_JVM_VERSION="17" \
--volume $HOME/.m2:/home/cnb/.m2:rw \
--path .
===> ANALYZING
[analyzer] Image with name "kind-registry.local:5000/quarkus-hello:1.0" not found
===> DETECTING
[detector] Warning: Platform requested experimental feature 'Dockerfiles'
[detector] 12 of 30 buildpacks participating
[detector] paketo-community/ubi-java-extension 0.1.1
[detector] paketo-community/ubi-java-buildpack 0.1.0
[detector] paketo-buildpacks/ca-certificates 3.6.8
[detector] paketo-buildpacks/bellsoft-liberica 10.5.5
[detector] paketo-buildpacks/syft 1.45.0
[detector] paketo-buildpacks/maven 6.15.14
[detector] paketo-buildpacks/executable-jar 6.8.5
[detector] paketo-buildpacks/apache-tomcat 7.15.3
[detector] paketo-buildpacks/apache-tomee 1.8.2
[detector] paketo-buildpacks/liberty 4.0.4
[detector] paketo-buildpacks/dist-zip 5.6.10
[detector] paketo-buildpacks/spring-boot 5.27.11
[detector]
[detector] Paketo UBI Java Extension 0.1.1
[detector]
[detector] Build Configuration:
[detector] $BP_JVM_VERSION 17 the Java version
[detector] Using Java version 17 from BP_JVM_VERSION
[detector] Using UBI Java package java-17-openjdk-devel
[detector] Using UBI Java run image paketocommunity/run-java-17-ubi-base
[detector] Warning: new runtime base image 'paketocommunity/run-java-17-ubi-base' not found in run metadata
627c98c89575: Download complete
ee0712c453dc: Download complete
69cdea755881: Download complete
7c4709456100: Download complete
ad95d97d3210: Download complete
===> RESTORING
===> EXTENDING (BUILD)
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Using dockerignore file: /workspace/.dockerignore"
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Built cross stage deps: map[]"
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Executing 0 build triggers"
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Building stage 'base@sha256:6b8ad3fbeca4020c48b4763c491039e02feb0fb01ed872d6c0b4bffed9b021d8' [idx: '0', base-idx: '-1']"
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Cmd: USER"
[extender (build)] time="2024-04-11T11:36:39Z" level=info msg="Checking for cached layer oci:/kaniko/cache/layers/cached:be7b8c9890d7f0170897410e3835d053b93820fbaecf986f53fd45e24cfa2268..."
...
[extender (build)] Paketo Buildpack for Maven 6.15.14
[extender (build)] https://github.com/paketo-buildpacks/maven
[extender (build)] Build Configuration:
[extender (build)] $BP_EXCLUDE_FILES colon separated list of glob patterns, matched source files are removed
[extender (build)] $BP_INCLUDE_FILES colon separated list of glob patterns, matched source files are included
[extender (build)] $BP_JAVA_INSTALL_NODE false whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
[extender (build)] $BP_MAVEN_ACTIVE_PROFILES the active profiles (comma separated: such as: p1,!p2,?p3) to pass to Maven
[extender (build)] $BP_MAVEN_ADDITIONAL_BUILD_ARGUMENTS the additionnal arguments (appended to BP_MAVEN_BUILD_ARGUMENTS) to pass to Maven
[extender (build)] $BP_MAVEN_BUILD_ARGUMENTS package -DskipTests=true -Dmaven.javadoc.skip=true -Dquarkus.package.type=fast-jar the arguments to pass to Maven
[extender (build)] $BP_MAVEN_BUILT_ARTIFACT target/quarkus-app/lib/ target/quarkus-app/*.jar target/quarkus-app/app/ target/quarkus-app/quarkus/ the built application artifact explicitly. Supersedes $BP_MAVEN_BUILT_MODULE
[extender (build)] $BP_MAVEN_BUILT_MODULE the module to find application artifact in
[extender (build)] $BP_MAVEN_DAEMON_ENABLED false use maven daemon
[extender (build)] $BP_MAVEN_POM_FILE pom.xml the location of the main pom.xml file, relative to the application root
[extender (build)] $BP_MAVEN_SETTINGS_PATH the path to a Maven settings file
[extender (build)] $BP_MAVEN_VERSION 3 the Maven version
[extender (build)] $BP_NODE_PROJECT_PATH configure a project subdirectory to look for `package.json` and `yarn.lock` files
[extender (build)] Cache already exists
[extender (build)] Compiled Application: Contributing to layer
[extender (build)] Executing mvnw --batch-mode package -DskipTests=true -Dmaven.javadoc.skip=true -Dquarkus.package.type=fast-jar
[extender (build)] Warning: JAVA_HOME environment variable is not set.
[extender (build)] [INFO] Scanning for projects...
[extender (build)] [INFO]
[extender (build)] [INFO] ---------------------< dev.snowdrop:quarkus-hello >---------------------
[extender (build)] [INFO] Building quarkus-hello 1.0
[extender (build)] [INFO] from pom.xml
[extender (build)] [INFO] --------------------------------[ jar ]---------------------------------
[extender (build)] [INFO]
[extender (build)] [INFO] --- resources:3.3.1:resources (default-resources) @ quarkus-hello ---
[extender (build)] [INFO] ------------------------------------------------------------------------
[extender (build)] [INFO] BUILD FAILURE
[extender (build)] [INFO] ------------------------------------------------------------------------
[extender (build)] [INFO] Total time: 12.007 s
[extender (build)] [INFO] Finished at: 2024-04-11T11:38:32Z
[extender (build)] [INFO] ------------------------------------------------------------------------
[extender (build)] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources (default-resources) on project quarkus-hello: Cannot create resource output directory: /workspace/target/classes -> [Help 1]
[extender (build)] [ERROR]
[extender (build)] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[extender (build)] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[extender (build)] [ERROR]
[extender (build)] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[extender (build)] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[extender (build)] unable to invoke layer creator
[extender (build)] unable to contribute application layer
[extender (build)] error running build
[extender (build)] exit status 1
[extender (build)] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
As we didn't merged the PR created long time ago, I will then update the versions part of this ticket and align them with the PR
PR merged and new release created 0.1.3
Todo
Bump the project to the latest versions: