-
Notifications
You must be signed in to change notification settings - Fork 42
Description
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:
# export the ubuntu docker image to ubuntu.tar
crane export ubuntu ubuntu.tar
# we can list the content of the tar with this command
tar -tvf ./ubuntu.tar
# we can export the content of the a specific file using this command
tar -zxvf ./ubuntu.tar var/log/alternatives.log
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