Open rrileyca opened 1 month ago
That part of the code is walking your application files. I suspect that it's probably hitting a symlink that doesn't resolve because the target isn't in the image. I don't know why else it would be looking for that file, nothing in the buildpack directly uses or expects Python to be present.
What is your pack build
command? If you're not specifically setting the --path
argument, it will use the present directory as the content for your application. Either check that directory or the directory specified by --path
and see if there are extra files that don't need to be sent for the build.
You can tell pack to ignore files via the project.toml file. You can usually speed up builds by ignoring unnecessary files as well because it's less for pack to copy into the container.
Thanks for the quick response.
The pack command looks like this:
pack build $IMAGE_NAME --path ~/git/myproject \
--volume ${BINDINGS_DIR}:/platform/bindings \
--volume ~/.pack-m2:/home/cnb/.m2:rw \
-B paketobuildpacks/builder-jammy-full \
-e PACK_VOLUME_KEY=packvolume \
-e BP_JVM_VERSION=21 \
-e BP_MAVEN_BUILT_ARTIFACT=${APP_TO_BUILD}/target/${APP_NAME}-1.0.5-SNAPSHOT.jar \
-e BP_MAVEN_BUILD_ARGUMENTS="-DskipTests=true -P profile1,profile2 package -pl ${APP_TO_BUILD} -am -T 2C"
The m2 volume mount is a separate m2 folder from my ~/.m2
because I used to get all sorts of permission errors.
The ${BINDINGS_DIR} is used to mount TLS certificates.
I wouldn't expect that to cause the issues you're seeing. I would suggest checking what's in ~/git/myproject
. Look for hidden folders, things unnecessary to your app being built and put them in the ignore list.
Everything in ~/git/myproject
will be copied into the workspace of the build, unless you specifically ignore it.
Another thing you could try would be to point --path
to the target JAR/WAR of your application build. Run Maven locally to build it, and then run pack build
with the modified path. This will change so that the build is only the contents of your JAR/WAR, which should eliminate any stray files from making it into the container also.
When I run the maven buildpack, I get this cryptic error. Google turns up nothing. I'm not really sure where to start with this. I think the error is coming from within the container? If not it's extra strange because I have
/usr/bin/python3.10
.I'm using
pack --version
0.35.1
Full logs is below: