compose: Windows docker fails to use build function of docker-compose
Description of the issue
Errors about credential occurs on build
within docker-compose.yml
on Windows.
Context information (for bug reports)
Output of docker-compose version
docker-compose version 1.25.4, build 8d51620a
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1c 28 May 2019
Output of docker version
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:22:37 2019
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:29:19 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker-compose config
(Make sure to add the relevant -f
and other flags)
services:
redis:
image: redis:alpine
web:
build:
context: C:\Users\cacog\OneDrive\Documents\composetest
ports:
- 5000:5000/tcp
version: '3.0'
Steps to reproduce the issue
- Follow
Step 1
toStep 4
of Get started with Docker Compose
Observed result
docker-compose up
of Step 4
fails to build.
Expected result
Successfull docker-compose up
.
Stacktrace / full error message
Building web
Traceback (most recent call last):
File "site-packages\docker\credentials\store.py", line 80, in _execute
File "subprocess.py", line 395, in check_output
File "subprocess.py", line 487, in run
subprocess.CalledProcessError: Command '['C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker-credential-desktop.EXE', 'list']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose\cli\main.py", line 72, in main
File "compose\cli\main.py", line 128, in perform_command
File "compose\cli\main.py", line 1077, in up
File "compose\cli\main.py", line 1073, in up
File "compose\project.py", line 548, in up
File "compose\service.py", line 367, in ensure_image_exists
File "compose\service.py", line 1106, in build
File "site-packages\docker\api\build.py", line 261, in build
File "site-packages\docker\api\build.py", line 308, in _set_auth_headers
File "site-packages\docker\auth.py", line 302, in get_all_credentials
File "site-packages\docker\credentials\store.py", line 71, in list
File "site-packages\docker\credentials\store.py", line 93, in _execute
docker.credentials.errors.StoreError: Credentials store docker-credential-desktop exited with "error listing credentials - err: exit status 1, out: `A specified logon session does not exist. It may alrea
dy have been terminated.`".
[2780] Failed to execute script docker-compose
Additional information
OS version
- Edition : Windows 10 Pro
- Version : 1903
- OS build : 18362.657
docker-compose
install method
docker-compose
is installed with official installer of docker
.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20
Possible work around , After SSH’ing into your guest (linux) run the following commands :
Edit: ^ I forgot to specify that this solution was performed within a WSL2 environment on Windows 10.
I find that this error only occurs over ssh. I’m using ssh server on windows, Win32 OpneSSH and when I use docker-compose build over ssh, above error occurs. However, when I try docker build (not docker-compose build) over ssh, it works well. So I think it’s still a problem of docker-compose and I’ll leave this issue opened.
@luisegarduno In this issue, we are talking about docker running on Windows. Not linux.
It happens to me when I use git bash, when I run the command on the windows cmd this problem does not happen
Try renaming the file instead of deleting it. The file will get re-created almost immediately after it is deleted. Renaming it (config.bla or whatever) gives you some extra seconds until it is also recreated.
Same here: docker and docker-compose versions are exactly the same, but running on WIndows 10 1909 (18363.418). The error also does occur when sitting right in front of the system (so not ssh’ing into Windows). Deleting %userprofile%.docker\config.json solves the problem and docker-compose pull runs without any errors. But config.json gets recreated after some time.