cli
cli copied to clipboard
CLI tools do not cache auth token
Description
CLI tools do not cache the registry auth token across invocations, even though token has expires_in field set to one hour
Steps to reproduce the issue:
- Perform an action against a registry that requires auth tokens
- Get 401 redirect to acquire token
- Acquire token with 3600 second expiration, and use it to perform operation
- Try registry operation again one second later
Describe the results you received:
CLI appears to have forgotten the auth token just obtained, and must go through the process acquiring it again.
Describe the results you expected:
After acquiring an auth token with an expires_in field, use that token until it expires.
Additional information you deem important (e.g. issue happens only occasionally):
Always happens.
Output of docker version:
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-1.12.6-32.git88a4867.el7.centos.x86_64
Go version: go1.7.4
Git commit: 88a4867/1.12.6
Built: Mon Jul 3 16:02:02 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Package version:
Go version: go1.7.6
Git commit: d9ad3fc
Built: Thu Oct 26 03:30:45 2017
OS/Arch: linux/amd64
Output of docker info:
Containers: 17
Running: 17
Paused: 0
Stopped: 0
Images: 22
Server Version: 1.12.6
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: overlay null bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp selinux
Kernel Version: 4.13.9-coreos
Operating System: Container Linux by CoreOS 1520.8.0 (Ladybug)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 24
Total Memory: 62.88 GiB
Name: core01.tec1.tivo.com
ID: MXJB:SJWY:3OZ5:3JY6:6G7N:FYJX:D2HN:PBWX:3W7K:DTOV:LVGV:MLSO
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Registries:
Additional environment details (AWS, VirtualBox, physical, etc.):
running in CoreOS, with Artifactory as docker registry.