Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to avoid storing a pushed image #605

Open
ltrzesniewski opened this issue Nov 26, 2024 · 0 comments
Open

Option to avoid storing a pushed image #605

ltrzesniewski opened this issue Nov 26, 2024 · 0 comments

Comments

@ltrzesniewski
Copy link

Currently, the layer generated by the build is stored in %TEMP%/Containers/Content (see in the ContentStore class), and the documentation says you should use docker to cleanup those manually.

I have a service which builds and pushes images regularly, and it ended up filling its disk space because of those local layers. I don't want to install docker or have to clean up these layers manually, so I ended up reading the binlog, which contains the container manifest (in the GeneratedContainerManifest output property of the CreateNewImage task), which lists the layer digests, then delete the files based on this info.

It would be nice to have something like a ContainerCleanup or ContainerStoreLocally MSBuild property which would do this cleanup automatically. This would enable having a build server which doesn't fill up its temp directory unnecesarily.

I suppose removing only the last layer would be sufficient since this is the one which contains the built files, but I may be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant