I understand the difference between export
(for containers) and save
(for images). But at the end of the day the tarball produced by either save or
As a Docker-newbie, I learnt this difference the hard way.
On one system:
docker run -it myImage /bin/bash
--> Works fine
On that same system (using save):
docker save myImage -o myImage.tar
On second system (using import):
docker import myImage.tar
--> Works nicely, no issues, just tag required:
docker tag _the_assigned_tag myImage
On that second system:
docker run -it myImage /bin/bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown.
Looking for that error brought my to all kinds of reasons such as MountFlags="slave"
, but the real reason turned out to be the one described in this post: I should have used load instead of import. Not knowing what was going on, Docker's error message didn't put me in any sense on track towards the "import" cause, till I stumbled over this post.