#Copy a container output to another container
1 messages · Page 1 of 1 (latest)
Short answer: Yes 🙂
Thank you for the answer! I think there must be some example on this, but I couldn't find one. Could you kindly provide me some pointers?
One solution that I can think of is saving the first container build output to the host and mounting that host directory to the second container and use. But I'm not sure if that's the right pattern.
Even better, no need to copy to the host at all, you're able to grab the build artifacts from the builder container just like in a dockerfile. Here's an example:
https://github.com/kpenfound/greetings-api/blob/v0.3.1/ci/tasks/push.go#L28-L41
Its doing some other stuff in that file as well, so I can type up a more concise example of a multistage build for the docs