Open turt2live opened 1 year ago
Hi @turt2live sorry for the delay, I'm doing a triage of the repo and found this issue as a quick win 🤞 .
I submitted a PR yesterday, so I wonder if you could give it a try 🙏
Unfortunately I haven't been able to upgrade to newer versions due to something with mounts. I've been meaning to fix it though, so will try to take a look.
Yeah, we changed it a little bit a few releases ago. Please let me know if I can be of help, here or in Slack, in the migration.
Thanks!
@turt2live we added labels to the built images in #2579, which landed in v0.32.0
. Could you verify it works as expected?
Thanks!
PS: I can still help you out with the migration, if the repo is public I can send a few PRs for it.
I haven't had much time myself to test, sorry 😭
The repo is up at https://github.com/t2bot/matrix-media-repo if you'd like to poke at it. The test framework stuff is a bit scary looking - if you prefer to leave it alone, that's fine. Equally, if you'd like to rip it all out and try again, please feel free. I have zero attachment to any of that code, and plan to rewrite it one day myself.
Hey @turt2live I'm not sure if I did it right 😅 but here it is: https://github.com/t2bot/matrix-media-repo/pull/614 🙏
Testcontainers version
v0.22.0
Using the latest Testcontainers version?
Yes
Host OS
Windows 11
Host arch
x64
Go version
1.19
Docker version
Docker info
What happened?
When using a Dockerfile with a multi-stage build, the interstitial images are not cleaned up at the end of execution. I'm building the image with:
Which results in the following dangling images:
The first two are because I actually build the container twice, for reasons related to the project.
test
is an example build fromdocker build -t test .
to see what it does. The remaining two are me trying to trick testcontainers into doing something it isn't really designed to do[^1], so I'll take responsibility for them ;)Example (partial) dockerfile:
Relevant log output
No response
Additional information
[^1]: To avoid building an image twice, I dig into the internals of testcontainers-go a bit. Specifically, I create (but don't start) a container directly on the provider then capture the image name for use in a future container start. This seems to leave behind the image (the UUID below
test
in the screenshot above) as well as the interstitial build.