i export image tar file, , i'm looking @ docker save command. can't seem find in remote api though.
i see other commands in remote api supports tar streams in both request , response, seems should possible.
is not supported, or missing something?
if know ruby, can try gem docker-api
# export single docker image file # docker command reference: docker save <image.id> my_export.tar image.save('my_export.tar') # => docker::image { :id => 66b712aef, :connection => docker::connection { :url => tcp://localhost, :options => {:port=>2375} } }
you can use create image tar file
# create image tar file. # docker command reference: docker build - < docker_image.tar docker::image.build_from_tar(file.open('docker_image.tar', 'r')) # => docker::image { :id => 1266dc19e, :connection => docker::connection { :url => tcp://localhost, :options => {:port=>2375} } }
refer
- readme: swipely/docker-api
Comments
Post a Comment