docker / docker/cli

Can't view interaction with private registry to troubleshoot

Open
#376 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/authentication area/distribution area/ux kind/enhancement version/17.06
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

I would like to be able to see the detailed interactions with a docker v2 registry.

I'm using Artifactory to provide a docker v2 registry. It is configured to allow anonymous push and works on most of the computers in our office. About 1 in 3 computers (usually Macs) get an error

$ docker push stash.company.com:8443/pmd
The push refers to a repository [stash.company.com:8443/pmd]
24af4657da8d: Preparing
...
d17d48b2382a: Waiting
unauthorized: BAD_CREDENTIAL

I have been unable to figure out what is different between these computers that causes some computers to get this error and other to work as expected. I have compared ~/.docker/config.json to ensure there isn't a credential being passed.

What I have tried:

I tried adding --debug, -D to the docker push command, but it doesn't show any details about the interaction with the registry, so I can't see if it's trying to send a credential when it shouldn't be.

I also tried following the Docker daemon logs to see if they provided some details about the interaction with the registry, but it only shows a DNS lookup.

I have asked three or four times on the slack channel and I posted this question on SO:
https://stackoverflow.com/questions/45172693/docker-push-how-to-see-detailed-interaction-with-registry

It would seem that this isn't possible, so this is probably a feature request. I would like to be able to view detailed logs showing how my local docker is interacting with a registry.

Output of docker version:

$ docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:31:53 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:51:55 2017
 OS/Arch:      linux/amd64
 Experimental: true

Output of docker info:

$ docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 2
Server Version: 17.06.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
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 logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.36-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: moby
ID: RYYU:QDZ6:YNDV:7GSO:VEEV:YLXD:KPJW:RB4T:CIB6:AQKI:V6ET:ZF32
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 18
 Goroutines: 30
 System Time: 2017-07-24T14:46:57.11149011Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
MacOS Sierra (10.12.5) with native install of Docker CE Stable

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the docker push against the private Artifactory Docker v2 registry described in the issue, with --debug or -D enabled, and compare the output with the daemon logs. The work is done when Docker CLI output exposes enough registry interaction detail to troubleshoot whether credentials are being sent.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.