mincs icon indicating copy to clipboard operation
mincs copied to clipboard

Fail import docker image to contain multiple images

Open ukinau opened this issue 8 years ago • 1 comments

If you try to import the docker image to contain multiple images, like as followings.

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              latest              c73a085dc378        5 weeks ago         127.1 MB
ubuntu              14.04               f2d8ce9fa988        5 weeks ago         187.9 MB

$ docker save ubuntu | gzip - > ubuntu.tar.gz

ubuntu.tar.gz contains 2 images 'ubuntu:latest' and 'ubuntu:14.04'.

$ tar -zxf ubuntu.tar.gz repositories  -O | jq .
{
  "ubuntu": {
    "latest": "9d2e5c12a9428108649812c24645eba52c030507a74c891984b3fb7f218d7690",
    "14.04": "e5db79ecb021272090388a7b2999748fe2534fce2a633f786a67441b283b4c87"
  }
}

On above conditions, if you try to import ubuntu.tar.gz with marten, it will fail with following error

$ sudo mincs/marten import ubuntu.tar.gz
Importing image: ubuntu
jq: error: Cannot index number with string
parse error: Invalid numeric literal

I don't thinks we need to load multiple images at once, but at least we need to logs to indicate it can't load multiple images at once to keep implementation with simple.

ukinau avatar Nov 06 '16 22:11 ukinau

Hmm, at this point, marten only supports single version(tagged) image, not multiple version. But it seems better to consider as an enhancement idea. Thank you,

mhiramat avatar Nov 12 '16 05:11 mhiramat