I have rather interesting problem to solve. I am using client.container().from() which works just fine when online, but fails for obvious reasons while offline. However it also fails when the Docker container was already retrieved (cached). I understand why, it is because it is trying to fetch the manifest and so on.
So my question is the - how can I make it so that my program can also work offline when the container was already fetched earlier. Is there a way to do this? The desired behaviour would be in case of from() fail just use the already present container.
I suppose one way would be to export it as tarball and then import it when the from() fails. But that is cumbersome at best. I looked into documentation and found stuff like ContainerID and ImageRef, but no way to actually use them.