-
Notifications
You must be signed in to change notification settings - Fork 36
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
Copying a file from a container before starting it #125
Comments
Do you have an example implementation, or reference to the documentation on how they do this? |
Hi @joyrex2001 thank you for the quick reply Here is an example code
In a broader context they say they use the below lines of code to copy the file then modify it somehow and then copy it back before starting the container. I hope it helps explain the use case |
Another way to replicate the issue using the docker cli commands with the real docker engine
|
addition to #53 |
We are evaluating KubeDock as a way to run testcontainers-java in a pipeline on our existing k8s infrastructure.
Our developers say that when they are using testcontainers-java they use the feature of reading data from a container image prior to starting it so they can modify it and push it to the container either before starting it or after.
Is this something that can be implemented in KubeDock ?
My guess is that k8s won't have a mechanism for it so maybe KubeDock can download the image itself and extract the file from it?
EDIT:
I did some additional research on this feature and it looks like the tool crane supports exporting the container image to a tar and then we can use tar to extract a specific file/folder etc
Example:
I assume its possible to read and extract from the tar file using go.
as far as using crane we can either install it the KubeDock image and call it or maybe look at its code since its written in go and implement a similar feature directly into KubeDock
Thanks
DM
The text was updated successfully, but these errors were encountered: