Hi!
I don’t understend how to EXPORT a container using SDK Java.
Is ther anyone can help me? Thank you.
I changed your post from the “Community” catagory to “General Discussions/General” as you post has nothing to do with questions or activities about Community events.
As there is no official Java SKD, but 4 unofficial Java SDK’s, you need to mention which one you are using.
For instance with spotify/docker-client, it would be as easy as this:
String containerName = "my_container";
String outFile = "/path/to/export.tar";
DockerClient dockerClient = DockerClientBuilder.getInstance().build();
FileOutputStream outputStream = new FileOutputStream(outFile);
dockerClient.save(containerName).writeTo(outputStream);
outputStream.close();
I changed your post from the “Community” catagory to “General Discussions/General” as you post has nothing to do with questions or activities about Community events.
Sorry ![]()
I’m newbie to this frontend and didn’t quite understand how it worked.
Thank you very much for your tip.
Don’t worry. There is nothing to be sorry about.
I hope the code snippet works out for you and uses actually the library you used.