{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/20527","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/20527/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/20527/comments","events_url":"https://api.github.com/repos/docker/docker/issues/20527/events","html_url":"https://github.com/docker/docker/issues/20527","id":135012864,"number":20527,"title":"Since \"docker tag\" does not validate IP address, docker adds images that can never be pulled","user":{"login":"vhosakot","id":8882663,"avatar_url":"https://avatars.githubusercontent.com/u/8882663?v=3","gravatar_id":"","url":"https://api.github.com/users/vhosakot","html_url":"https://github.com/vhosakot","followers_url":"https://api.github.com/users/vhosakot/followers","following_url":"https://api.github.com/users/vhosakot/following{/other_user}","gists_url":"https://api.github.com/users/vhosakot/gists{/gist_id}","starred_url":"https://api.github.com/users/vhosakot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhosakot/subscriptions","organizations_url":"https://api.github.com/users/vhosakot/orgs","repos_url":"https://api.github.com/users/vhosakot/repos","events_url":"https://api.github.com/users/vhosakot/events{/privacy}","received_events_url":"https://api.github.com/users/vhosakot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-20T00:48:54Z","updated_at":"2016-02-20T18:28:32Z","closed_at":"2016-02-20T17:50:35Z","body":"\"docker tag\" does not validate IP address and port. Due to this issue, docker adds images that can never be pulled. `192.168.122.41` below is a valid local IP address on the host and can be pinged.\r\n\r\n**$ docker version**\r\nClient:\r\n Version:      1.10.1\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   9e83765\r\n Built:        Thu Feb 11 19:27:08 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.10.1\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   9e83765\r\n Built:        Thu Feb 11 19:27:08 2016\r\n OS/Arch:      linux/amd64\r\n\r\n**$ docker info**\r\nContainers: 2\r\n Running: 2\r\n Paused: 0\r\n Stopped: 0\r\nImages: 344\r\nServer Version: 1.10.1\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 321\r\n Dirperm1 Supported: true\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nPlugins: \r\n Volume: local\r\n Network: bridge null host\r\nKernel Version: 4.2.0-27-generic\r\nOperating System: Ubuntu 14.04.1 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 8\r\nTotal Memory: 31.42 GiB\r\nName: kolla-ubuntu\r\nID: CH5Y:PDT2:ZGWS:F6OG:HNUG:6A2D:DZ3D:M7WZ:2O5W:EFOJ:Y47G:IRDZ\r\nWARNING: No swap limit support\r\n\r\n**Additional environment details:**\r\n\r\nUbuntu 14.04, Docker version 1.10.1 (build 9e83765),\r\nStorage Driver: aufs, Kernel version (4.2.0-27-generic)\r\n\r\n**Docker daemon running:**\r\n\r\n**$ ps aux | grep docker**\r\nroot      3493  1.0  0.1 1156028 59376 ?       Ssl  17:57   0:32 /usr/bin/docker daemon --insecure-registry 192.168.122.41:4000\r\nroot      3566  0.1  0.0 510184 30996 ?        Sl   17:57   0:05 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 4000 -container-ip 172.17.0.2 -container-port 5000\r\nroot      3585  0.1  0.0 486156 27640 ?        Ssl  17:57   0:04 /bin/registry /etc/docker/registry/config.yml\r\n\r\n\r\n**Steps to reproduce the issue:**\r\n\r\n1. Run the following commands. `192.168.122.41` below is a valid local IP address on the host and can be pinged.\r\n\r\n$ docker tag ubuntu 192.168.122.41:4000/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7777:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7778:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7779:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7780:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7781:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7782:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7783:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7784:99999999/myfirstimage\r\n$ docker tag ubuntu 1111.2222.3333.4444.5555.6666.7785:99999999/myfirstimage`\r\n\r\n**Result received:**\r\n\r\n**$ docker images | grep myfirstimage**\r\n1111.2222.3333.4444.5555.6666.7777:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7778:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7779:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7780:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7781:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7782:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7783:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7784:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n1111.2222.3333.4444.5555.6666.7785:99999999/myfirstimage   latest              14b59d36bae0        2 days ago          188 MB\r\n192.168.122.41:4000/myfirstimage                           latest              14b59d36bae0        2 days ago          188 MB\r\n\r\nThe images with invalid IP address and port cannot be pulled ever. See below.\r\n\r\n**$ docker pull 1111.2222.3333.4444.5555.6666.7777:99999999/myfirstimage**\r\nUsing default tag: latest\r\nError response from daemon: unable to ping registry endpoint https://1111.2222.3333.4444.5555.6666.7777:99999999/v0/\r\nv2 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7777:99999999/v2/: dial tcp: unknown port tcp/99999999\r\n v1 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7777:99999999/v1/_ping: dial tcp: unknown port tcp/99999999\r\n\r\n**$ docker pull 1111.2222.3333.4444.5555.6666.7778:99999999/myfirstimage**\r\nUsing default tag: latest\r\nError response from daemon: unable to ping registry endpoint https://1111.2222.3333.4444.5555.6666.7778:99999999/v0/\r\nv2 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7778:99999999/v2/: dial tcp: unknown port tcp/99999999\r\n v1 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7778:99999999/v1/_ping: dial tcp: unknown port tcp/99999999\r\n\r\n**$ docker pull 1111.2222.3333.4444.5555.6666.7785:99999999/myfirstimage**\r\nUsing default tag: latest\r\nError response from daemon: unable to ping registry endpoint https://1111.2222.3333.4444.5555.6666.7785:99999999/v0/\r\nv2 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7785:99999999/v2/: dial tcp: unknown port tcp/99999999\r\n v1 ping attempt failed with error: Get https://1111.2222.3333.4444.5555.6666.7785:99999999/v1/_ping: dial tcp: unknown port tcp/99999999\r\n\r\n**The image with valid IP address and port can be pulled fine.**\r\n\r\n**$ docker pull 192.168.122.41:4000/myfirstimage**\r\nUsing default tag: latest\r\nlatest: Pulling from myfirstimage\r\nDigest: sha256:cf852d4ef13b95dd3f33dbe19f673e0d45d0716f27eaa8b62964766532f81918\r\nStatus: Downloaded newer image for 192.168.122.41:4000/myfirstimage:latest\r\n\r\n**Results expected:**\r\n\r\n**$ docker images | grep myfirstimage**\r\n\r\n192.168.122.41:4000/myfirstimage                           latest              14b59d36bae0        2 days ago          188 MB\r\n\r\nNo other image with invalid IP address and port should be added as they cannot be pulled."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/186662861","html_url":"https://github.com/docker/docker/issues/20527#issuecomment-186662861","issue_url":"https://api.github.com/repos/docker/docker/issues/20527","id":186662861,"user":{"login":"vhosakot","id":8882663,"avatar_url":"https://avatars.githubusercontent.com/u/8882663?v=3","gravatar_id":"","url":"https://api.github.com/users/vhosakot","html_url":"https://github.com/vhosakot","followers_url":"https://api.github.com/users/vhosakot/followers","following_url":"https://api.github.com/users/vhosakot/following{/other_user}","gists_url":"https://api.github.com/users/vhosakot/gists{/gist_id}","starred_url":"https://api.github.com/users/vhosakot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhosakot/subscriptions","organizations_url":"https://api.github.com/users/vhosakot/orgs","repos_url":"https://api.github.com/users/vhosakot/repos","events_url":"https://api.github.com/users/vhosakot/events{/privacy}","received_events_url":"https://api.github.com/users/vhosakot/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T18:28:32Z","updated_at":"2016-02-20T18:28:32Z","body":"It it ok to show images in the output of `docker images` that can neither be pushed nor pulled ?\r\n\r\nAn image like `1111.2222.3333.4444.5555.6666.7785:99999999/myfirstimage` can neither be pushed nor pulled. Shouldn't there be a **note** about this in the documentation for `docker tag` in https://docs.docker.com/engine/reference/commandline/tag/ ?"}}