paketo buildpacks bellsoft-liberica: wrong path during memory-calculator execution #328
NValanos
started this conversation in
Dependencies Team
Replies: 1 comment
-
Can you reproduce this using
From a quick glance, this could be problematic. You're reusing the environment for your second build, which you shouldn't do. You want a new clean environment for each build. Also, make sure you do a fresh checkout of your source or copy the source into the directory where you're building because buildpack do modify the source directory. I've seen this cause issues with other users. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I have a spring-boot maven project that consists of multiple inner projects and I need to create docker images for the 2 inner projects. An example of the structure would be the following:
Due to the fact that the building process needs to run on a non-docker gitlab runner, I'm using the 'creator' command immediately from the pre-loaded 'paketobuildpacks/builder-jammy-base' image. The .gitlab.ci job looks like this:
As you can see, I need to build 2 images, one for the service-api and one for the service-simulator.
The build succeeds and the images are uploaded in the gitlab's container-registry. Also, when I try to create containers based on these images, everything works fine.
The problem occurs when I need to re-build the images based on a new version, for example:
In this case this build runs as expected, the images are properly created, even the container based on the image .../service-api:1.1.0 (the first image) runs just as planned. But when I try to run the container based on the image .../service-simulator:1.1.0 (the second image), I get the following error:
After running the container with '--entrypoint bash' in order to have a better look at the insides of the container, I can see that the path described in the error message
/builds/<gitlab-project-path>/service-api
doesn't exist. Instead, the existing path is the/builds/<gitlab-project-path>/service-simulator
which is the expected path since we have created an image forservice-simulator
.The question is how and why does bellsoft-liberica layer sets the path inside memory-calculator and why does it happen after the first successful build? One hint I have is that it might have something to do with the image-layers created from the previous runs and that they wrong ones are somehow being used to create the later versions of the images.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions