Reading list Switch to dark mode

    Error: /docker-import-012345678/bin/json: no such file or directory

    Updated 30 March 2018

    Today I face an error when I was trying to import an image by using following steps,

    • Switch to image directory path,
      cd docker/directory/image-path
    • Then run load command to import docker image in my system,
      cat docker_custom_image.tar | docker load
    • After running load command I was getting an error,
      open /var/lib/docker/tmp/docker-import-622414428/bin/json: no such file or directory

    Then a bit searching and research I found few solutions to import the image,

    1. You can fix this issue by creating the tmp folder inside /var/lib/docker/.
      (In my case this solution doesn’t work so I made a bit more research and find the solution.)
    2. I use below command in order to import the image.
      cat docker_custom_image.tar | docker import - custom_docker/image

      This ends up with the image showing up in

      docker images

    So this is how I found the solution to fix this issue but there is a question in everyone’s mind that why I was getting this issue?

    It is because I was using dockerĀ load command to import image export by docker export command.

    Start your headless eCommerce
    now.
    Find out More
    cat image-file |docker load

    Would only work if the image is created as a layered docker image, not as a tar ball.

    Basically correct way to import the image,

    Use docker import for image exported by docker export.

    Use docker load for image exported by docker save.

     

    We would love the hear your thoughts, suggestions, and questions in the comments below !!

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    1 comments

  • Abhishek Kumar
    This Knowledge helped me!
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home