cli icon indicating copy to clipboard operation
cli copied to clipboard

Missing error message when pull is run with :TAG and @DIGEST

Open bantu opened this issue 5 years ago • 3 comments

Description

Specifying both, :TAG and @DIGEST, for docker pull is not supported, but does not result in an error message.

Steps to reproduce the issue: I ran docker pull ghcr.io/siemens/kas/kas:2.3.2@sha256:b790bf2fb82b10b3e812734bfc10d86207029415d8c46f75fc4d62dc131442b5

Describe the results you received: The digest is used to obtain an image and the image is stored without tag association.

REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
ghcr.io/siemens/kas/kas   <none>              6da47f4f3350        11 days ago         823MB

Describe the results you expected:

  • A syntax error message since the command does not comply with the documented syntax
Usage:	docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 17:02:55 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:01:25 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 19.03.13
 Storage Driver: btrfs
  Build Version: Btrfs v4.20.1 
  Library Version: 102
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.19.0-12-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.36GiB
 Name: [redacted]
 ID: [redacted]
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):

bantu avatar Dec 01 '20 10:12 bantu

Following up from comment on https://github.com/docker/cli/issues/3946 We should improve the documentation and add warning output that the tag is ignored.

sam-thibault avatar Jan 13 '23 11:01 sam-thibault

@sam-thibault but why not actually add support for it instead of documenting the current state (in case my proposal wasn't clear on https://github.com/docker/cli/issues/3946). The current state means that i cant combine sha256 pulls and use the dangling filter at the same time

gkranis avatar Jan 17 '23 19:01 gkranis

i can't understand why tag and digest being mutually exclusive feature is a desirable behavior>

many things on the internet use human readable identifier and hash together.

html

 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous">
</script> 

magnet link

magnet:?xt=urn:btih:ffb48118162732c8f56ad3e5a5612f2dd1a2be72&dn=archlinux-2025.08.01-x86_64.iso

golang

go get github.com/someone/some_module@af044c0995fe

qrhfz avatar Aug 12 '25 12:08 qrhfz