Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker-compose failing on startup

I am running

docker-compose version 1.25.4, build 8d51620a

on

OS X Catalina, v10.15.4 (19E266)

I am using the system python.

When I run docker-compose, it crashes with the following error:

    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 355, in ensure_image_exists
  File "compose/service.py", line 381, in image
  File "site-packages/docker/utils/decorators.py", line 17, in wrapped
docker.errors.NullResource: Resource ID was not provided
[9018] Failed to execute script docker-compose

I have tried a fresh repo clone and a fresh install of docker, neither work. What could be causing this?

like image 656
sakurashinken Avatar asked Apr 07 '20 00:04

sakurashinken


2 Answers

It turned out that I had uninitialized environment variables that were causing the crash.

The particular cause was the env vars setting image names in the docker-compose file and then trying to pull a blank image.

like image 121
sakurashinken Avatar answered Oct 21 '22 11:10

sakurashinken


It can be initialized environment variables but for my case, it was some other command before docker-compose build which was failing.

  • I was pulling images from the registry but it could not find them/
like image 26
Espoir Murhabazi Avatar answered Oct 21 '22 10:10

Espoir Murhabazi