A similar question as Can I run an intermediate layer of docker image?, but the answers are for the image which you need build it locally.
My question is, I don't need docker run
the intermediate layer, I can only pull the image from public registry server, such as hub.docker.com.
For example, for the history (layers) of an image like this:
$ docker pull ruby
Using default tag: latest
latest: Pulling from library/ruby
e9afc4f90ab0: Already exists
989e6b19a265: Already exists
af14b6c2f878: Already exists
5573c4b30949: Already exists
11a88e764313: Pull complete
7bab57a324dc: Pull complete
0d7deb43995d: Pull complete
4315356f2eff: Pull complete
Digest: sha256:c750baf8de6d180aa48915655b79c35d93ef5665339860c1d608cb33e2ae873e
Status: Downloaded newer image for ruby:latest
docker.io/library/ruby:latest
can I get a tar from layer id 11a88e764313
?
Updates
I pulled the latest ruby image, the answer with docker save
doesn't work
$ docker save -o layer.tar 11a88e764313
Error response from daemon: No such image: 11a88e764313