Docker Community Forums

Share and learn in the Docker community.

Docker-compose encoding error


(Ashernave) #1

Hi,
I am a log time user of docker on mac. We use docker-compose as part of our build/test process.
Recently I’ve encountered a problem with docker-compose. I’m not sure if this is due to an upgrade or not.
My docker version is the most recent: Version 17.06.0-ce-mac19 (18663) Channel: stable. Docker Compose version is 1.14.0.

The problem is that whenever I’m trying to pull any image from docker, I’m getting the following error:
Pulling mongodb (mongo:3.2)…
Traceback (most recent call last):
File “docker-compose”, line 3, in
File “compose/cli/main.py”, line 68, in main
File “compose/cli/main.py”, line 118, in perform_command
File “compose/cli/main.py”, line 928, in up
File “compose/project.py”, line 427, in up
File “compose/service.py”, line 311, in ensure_image_exists
File “compose/service.py”, line 1016, in pull
File “site-packages/docker/api/image.py”, line 358, in pull
File “site-packages/docker/auth.py”, line 50, in get_config_header
File “site-packages/docker/auth.py”, line 97, in resolve_authconfig
File “site-packages/docker/auth.py”, line 125, in _resolve_authconfig_credstore
File “site-packages/dockerpycreds/store.py”, line 25, in get
File “site-packages/dockerpycreds/store.py”, line 57, in _execute
File “subprocess.py”, line 711, in init
File “subprocess.py”, line 1343, in _execute_child
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 0: ordinal not in range(128)

The sample docker-compose.yml file is:

version: "2.1"

services:
  mongodb:
    image: mongo:3.2
    command: mongod --smallfiles

Failed to execute script docker-compose


(Valeriomazzeo) #2

For some “unknown” reasons the OS X credentials store doesn’t work.

You can manually create a ~/.docker/config.json file:

{
 "auths": {
    "https://index.docker.io/v1/": {
        "auth": "aaaaBBB1112222="
    }
}
}

Where auth is: “username:password” base 64 encoded


(Mackankowski) #3

Removing entire content in ~/.docker/config.json solved the problem for me. Backup the file first for further needs.