compose icon indicating copy to clipboard operation
compose copied to clipboard

images command doesn't handle registry port numbers correctly in v2

Open emersonf opened this issue 2 years ago • 1 comments

Description If an image ID contains a registry with a port number, docker compose images incorrectly treats the port separator as the tag separator when displaying containers.

Describe the results you received:

services:
  foo:
    build:
      context: .
    image: localhost:5000/org/foo:some-tag
% docker compose images foo
Container             Repository          Tag            Image Id            Size
project-foo-1         localhost           5000/org/foo   217f123b9e7a        148MB

Describe the results you expected:

% docker compose images foo
Container             Repository               Tag        Image Id            Size
project-foo-1         localhost:5000/org/foo   some-tag   217f123b9e7a        148MB

This works correctly in V1:

% docker-compose images foo                                                                                                                                                                        
   Container           Repository           Tag       Image Id       Size  
------------------------------------------------------------------------------------------------------------
project-foo-1   localhost:5000/org/foo   some-tag   217f123b9e7a   147.6 MB

Output of docker compose version:

Docker Compose version v2.2.3

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.7.1)
  compose: Docker Compose (Docker Inc., v2.2.3)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 38
  Running: 30
  Paused: 0
  Stopped: 8
 Images: 87
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: local
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 13.67GiB
 Name: docker-desktop
 ID: 5TR7:DXJX:VLNN:PAAC:A2QY:7GHH:3H6W:SWTT:QLFG:IIVU:RDCH:RGCC
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

emersonf avatar Feb 25 '22 12:02 emersonf

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 10:09 stale[bot]