nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

images output wrong format

Open fahedouch opened this issue 5 years ago • 10 comments

Hi,

My dockerfile

FROM busybox
RUN echo "hello world"

I make a build :

nerdctl  build -t foo .

When I list my images i got a duplicate image:

./nerdctl images
WARN[0000] unparsable image name "overlayfs@sha256:f6af50796f7f2ee98a04bc5dbf721fb2ec4b6285f4f0cc4b0bd55e3f0f8249f0" 
REPOSITORY    TAG       IMAGE ID        CREATED          SIZE
foo           latest    f6af50796f7f    2 seconds ago    748.4 KiB
                        f6af50796f7f    2 seconds ago    748.4 KiB

fahedouch avatar Apr 16 '21 11:04 fahedouch

Buildkit version?

AkihiroSuda avatar Apr 16 '21 11:04 AkihiroSuda

@AkihiroSuda buildkitd github.com/moby/buildkit v0.8.1-120-gc47972dc c47972dc5a9e2f4fc0a58d299b6f096161203fbb

fahedouch avatar Apr 16 '21 12:04 fahedouch

same thing for buildkitd github.com/moby/buildkit v0.8.2 9065b18ba4633c75862befca8188de4338d9f94a

fahedouch avatar Apr 16 '21 12:04 fahedouch

Same issue, images.go show "WARN[0000] unparsable image name", though it's perfectly legal IMHO, docker - Restrictions regarding naming image

crictl images show 16 images without warn/error. nerdctl namespace ls show "IMAGES" count 16*3=48. nerdctl images show 16 lines of WARN[0000] unparsable image name "docker.io/bitnami/metallb-controller@sha256:e396c8737dd632ca84ab4d04fb8d7dfe47052a9a335db0610592744656d10c15" ... and after that, 16*2=32 duplicated image names.

sacesare avatar May 26 '21 13:05 sacesare

I have the same problem!nerdctl v0.11.0 version

Teo90 avatar Jul 22 '21 08:07 Teo90

Same problem here. I notice also that depending on the order of the arguments I get different results. For example . -t nginx creates 1 image while -t nginx . creates 2.

root@nerdctl001:~# nerdctl build . -t nginx
root@nerdctl001:~# nerdctl image ls
WARN[0000] unparsable image name "overlayfs@sha256:30567729b23b1f4b3d9b30ee9c7adbc640c4feb8919d85366d8c9d134089b35b"
REPOSITORY    TAG    IMAGE ID        CREATED           SIZE
                     30567729b23b    10 seconds ago    24.0 KiB
root@nerdctl001:~# nerdctl namespace ls
NAME        CONTAINERS    IMAGES    VOLUMES
buildkit    0             0         0
default     0             1         0
root@nerdctl001:~# nerdctl build -t nginx .
root@nerdctl001:~# nerdctl image ls
WARN[0000] unparsable image name "overlayfs@sha256:30567729b23b1f4b3d9b30ee9c7adbc640c4feb8919d85366d8c9d134089b35b"
REPOSITORY    TAG       IMAGE ID        CREATED          SIZE
nginx         latest    30567729b23b    8 seconds ago    24.0 KiB
                        30567729b23b    8 seconds ago    24.0 KiB
root@nerdctl001:~# nerdctl namespace ls
NAME        CONTAINERS    IMAGES    VOLUMES
buildkit    0             0         0
default     0             2         0

I'm using nerdctl-full-0.11.0-linux-amd64.tar.gz on an Ubuntu 20.04.2 fresh install. I also had the same problem on Arch. It happens on both rootful and rootless installs.

The image size is also wrong (way too small)

splooge avatar Aug 03 '21 09:08 splooge

I'm experiencing the same issue on my MacOS+lima setup. Depending on the order the parameter the tagging "fails" and there's always created a repo tag as :, that will give you warnings.

nerdctl version

Client:
 Version:	v0.11.1
 Git commit:	95071bf1c5ec9c844931bcedeff049d0ce6f3584

Server:
 containerd:
  Version:	v1.5.5
  GitCommit:	72cec4be58a9eb6b2910f5d10f1c01ca47d231c0

nerdctl info

Client:
 Namespace:	default
 Debug Mode:	false

Server:
 Server Version: v1.5.5
 Storage Driver: fuse-overlayfs
 Logging Driver: json-file
 Cgroup Driver: none
 Cgroup Version: 1
 Plugins:
  Log: json-file
  Storage: native overlayfs stargz fuse-overlayfs
 Security Options:
  seccomp
   Profile: default
  rootless
 Kernel Version: 5.11.0-31-generic
 Operating System: Ubuntu 21.04
 OSType: linux
 Architecture: x86_64
 Name: lima-default
 ID: 9282913f-642b-41e4-8066-14930938637a

buildkitd --version

buildkitd github.com/moby/buildkit v0.9.0 c8bb937807d405d92be91f06ce2629e6202ac7a9

nerdctl build . -t summerwind/actions-runner-controller:latest:

WARN[0000] unparsable image name "fuse-overlayfs@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
REPOSITORY    TAG    IMAGE ID        CREATED          SIZE
                     1dbd83fb64e2    7 seconds ago    94.6 MiB
WARN[0000] unparsable image name "fuse-overlayfs@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
[
    {
        "Id": "sha256:b8d42975341cf740298c036d25a4bc597cd5fbcc0f84530cc76e3e4eeef7137e",
        "RepoTags": [
            ":"
        ],
        "RepoDigests": [
            "@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
        ],
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2021-09-10 17:27:41.540411854 +0000 UTC",
        "Author": "",
        "Config": {
            "User": "nonroot:nonroot",
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "Cmd": null,
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/manager"
            ],
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:16679402dc206c982b5552ab8de7d898547100e5468be29d4f67d393c0eadfdb",
                "sha256:d1ac7d840d2a652863de7087cdd37afdbb96eaab7a48a9f8062ca0448e8a9a17",
                "sha256:52114d0dcf731cb651d22f782eb27ce0d0ea2f742ead7aac6baeeeeaf6594b48"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

nerdctl build -t summerwind/actions-runner-controller:latest .

WARN[0000] unparsable image name "fuse-overlayfs@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
REPOSITORY                              TAG       IMAGE ID        CREATED          SIZE
summerwind/actions-runner-controller    latest    1dbd83fb64e2    4 seconds ago    94.6 MiB
                                                  1dbd83fb64e2    4 seconds ago    94.6 MiB
WARN[0000] unparsable image name "fuse-overlayfs@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
[
    {
        "Id": "sha256:b8d42975341cf740298c036d25a4bc597cd5fbcc0f84530cc76e3e4eeef7137e",
        "RepoTags": [
            "summerwind/actions-runner-controller:latest"
        ],
        "RepoDigests": [
            "summerwind/actions-runner-controller@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
        ],
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2021-09-10 17:27:41.540411854 +0000 UTC",
        "Author": "",
        "Config": {
            "User": "nonroot:nonroot",
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "Cmd": null,
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/manager"
            ],
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:16679402dc206c982b5552ab8de7d898547100e5468be29d4f67d393c0eadfdb",
                "sha256:d1ac7d840d2a652863de7087cdd37afdbb96eaab7a48a9f8062ca0448e8a9a17",
                "sha256:52114d0dcf731cb651d22f782eb27ce0d0ea2f742ead7aac6baeeeeaf6594b48"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    },
    {
        "Id": "sha256:b8d42975341cf740298c036d25a4bc597cd5fbcc0f84530cc76e3e4eeef7137e",
        "RepoTags": [
            ":"
        ],
        "RepoDigests": [
            "@sha256:1dbd83fb64e2e9cfb4820895c4c6d3c07084f75c6195ebd30294ebf08e431434"
        ],
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2021-09-10 17:27:41.540411854 +0000 UTC",
        "Author": "",
        "Config": {
            "User": "nonroot:nonroot",
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "Cmd": null,
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/manager"
            ],
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:16679402dc206c982b5552ab8de7d898547100e5468be29d4f67d393c0eadfdb",
                "sha256:d1ac7d840d2a652863de7087cdd37afdbb96eaab7a48a9f8062ca0448e8a9a17",
                "sha256:52114d0dcf731cb651d22f782eb27ce0d0ea2f742ead7aac6baeeeeaf6594b48"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

rofafor avatar Sep 11 '21 05:09 rofafor

I have the same problem, when I build once with Dockerfile I get a new image and a warning that the image has no tag. This is true even if I use -t foo:latest . There were a lot of images without tags at build time. I don't know how to avoid this problem, but I think it might be a bug.

whg517 avatar Sep 18 '21 07:09 whg517

Should be fixed in https://github.com/containerd/nerdctl/pull/357 Will be included in v0.12

AkihiroSuda avatar Sep 28 '21 14:09 AkihiroSuda

OS: Ubuntu 21.04 (Default build with lima-vm) nerdctl version 0.12.1 containerd version v1.5.7 buildkitd github.com/moby/buildkit v0.9.1 966bcf4aa3ef397a9d6025fade18f2d59a5bf29d

Dockerfile

FROM debian:10.10
CMD ['echo' 'hello']

When I build an image without the "-t" flag, the image is build successfully. However when I use "nerdctl images", I get the the warning / output:

WARN[0000] unparsable image name "fuse-overlayfs@sha256:f2dc9897000d175a8cc9fa95c2e326c76005ae14814a109cedffe5885438cb9b" 
REPOSITORY    TAG    IMAGE ID        CREATED           SIZE
                     f2dc9897000d    15 seconds ago    181.2 MiB

nik-here avatar Oct 09 '21 14:10 nik-here