Replies: 1 comment 1 reply
-
@yilims that is an interesting question. You are right that intermediate files written by the lifecycle (and buildpacks) are in the layers directory by default, and in theory that is the only directory besides the workspace directory that would need to change. This assumes that buildpacks are following the specification and only making changes in those directories - but this is not enforced by the lifecycle. If buildpacks were to make changes (e.g., in the HOME directory) this would not be detected by the lifecycle and could result in unexpected behavior. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a background processing job deployed in a long running container. the container subscribes to a queue, when a new message arrives in the queue, the job read project source code info from the message and build a OCI image for the project. we have lots of projects and we have to build the projects in a long running container. The job is a go application and it calls lifecycle to build image.
The issue is: lifecycle produces lots of intermediate files in the container and we have to clean up all the files before build image for another project. Currently I remove all the files in folder "/layers" and everything seems good.
My question is: Is it a contract for the folders lifecycle write intermediate files? Do I need to remove files in other folders, or is it a better solution for running lifecycle in a long running container to build image for several projects?
I understand most of people create a new container to build image and don't have such issue, but currenlty in our use case we have to build image for serveral projects in a long running container. Really appreciated for any help here.
Beta Was this translation helpful? Give feedback.
All reactions