Docker compose failing in windows 10

Viewed 5345

I am on docker for windows version 2.3.0.5 and my docker compose is failing with this stranger error :

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 78, in main
TypeError: can only concatenate str (not "dict") to str
[25608] Failed to execute script docker-compose
5 Answers

For me, it was because docker-compose wasn't able to find a referenced Dockerfile. This happened after renaming one of the projects (thus changing its folder's name).

Thanks for your help, it turned out to be a windows issue with docker which is a nightmare. So I have restarted Docker and it works.

In my case this turned out to be a lack of resources allocated to Docker so I had to go to docker dashboard and increase memory and cpu allocated.

If you use dockerfile: . in docker-compose file, it would probably give the error mentioned above.

To avoid this error explicitly specify the dockerfile name as dockerfile: Dockerfile

I had this problem and it turns out that I still had venv enables. Once I got out (deactivate) it worked perfectly.

Related