Docker-compose produces Docker Desktop whiteout

Hi all! My first post here. I am pretty clueless about docker… Using Docker Desktop (v4.9.0) on Windows 10 (Home 21H2, Build 19044.1706), with Debian 10 for some months now, without a problem.

All of a sudden the Docker Desktop app crashed while running a docker-compose up -d from Debian. Crashed might be the wrong word–the screen of the app is whiting out. Just a white screen is shown. When I close the app and restart it, I see the app’s desktop flashing for a millisecond, then it is white again. It seems that the Docker demon is still working, the app that docker-compose created is working just fine. Tried to reinstall DD several times and checked the HDD of my MateBook X Pro.

Now I tracked it down to this: the DD screen is whiting out when the three containers of my yml are created, docker-compose create is sufficient to reproduce the problem. This is the yml:

version: '3.2'
services:
  database2:
    container_name: database2
    image: postgres:12
    restart: always
    volumes:
      - ./data/database:/var/lib/postgresql/data
    networks:
      - directus2
    environment:
      POSTGRES_USER: 'directus'
      POSTGRES_PASSWORD: 'directus'
      POSTGRES_DB: 'directus'
  cache2:
    container_name: cache2
    image: redis:7
    restart: always
    networks:
      - directus2
  directus2:
    container_name: directus2
    # image: directus/directus:9.0.0-rc.91
    image: directus/directus:9.12.1
    restart: always
    ports:
      - 8060:8055
    networks:
      - directus2
    depends_on:
      - cache2
      - database2
    environment:
      KEY: '255d861b-5ea1-5996-9aa3-922530ec40b1'
      SECRET: '6116487b-cda1-52c2-b5b5-c8022c45e263'
      DB_CLIENT: 'pg'
      DB_HOST: 'database2'
      DB_PORT: '5432'
      DB_DATABASE: 'directus'
      DB_USER: 'directus'
      DB_PASSWORD: 'directus'
      CACHE_ENABLED: 'true'
      CACHE_STORE: 'redis'
      CACHE_REDIS: 'redis://cache2:6379'
      ADMIN_EMAIL: 'blah@example.com'
      ADMIN_PASSWORD: 'blahblahpwd'
    volumes:
      - ./data/uploads:/directus/uploads
networks:
  directus2:

When kill DD with ALT-F4 and restart it, it is white. After deleting the containers form the Debian command line, DD is starting as expected.

What am I doing wrong? This docker-compose project has been running on this machine before without problems (around half a year ago)…

TIA Robert

Can you reproduce it by creating only some of those containers? Do you really have to always create all of them to get the error? Creating the container without starting it should not affect Docker Desktop.

  1. Did you upgrade Docker Desktop before you started to experience this?
  2. Do you have any Docker extension installed?
  3. Since Docker Desktop can show you the containers, maybe the containers have some metadata the Desktop can’t handle. If you can find which container is the that exactly, that could get us closer to the solution.
  4. I see that you still use the syntax supported by Docker Compose 1.x. Could you try to use docker-compose-v1 command instead of docker-compose? Recently I found out Docker Compose v2 (on MacOS) can affect whether volumes are working or not so I would try v1 just to test if it matters.
  5. Since you wrote you have been using Docker Desktop for months, I would also try to delete dangling images, unused volumes and containers to make sure you have enough space in the virtual machine. A created container does not take up much space, but this is the last I can think of.

Hi Ákos,

thank you for your feedback! Lots of things to digest for me…

  1. Did you upgrade Docker Desktop before you started to experience this?

I am not sure about the word upgrade… I update anytime DD tells me to do so. There has been an update to 4.9.0 recently, but I don’t recall any connection to the failure I am experiencing.

  1. Do you have any Docker extension installed?

No (at least not that I know of).

  1. Since Docker Desktop can show you the containers, maybe the containers have some metadata the Desktop can’t handle. If you can find which container is the that exactly, that could get us closer to the solution.

What I tried, exactly in that order:

  • docker-compose up -d => DD whiteout, all three containers running
  • docker stop directus2 => restart DD => whiteout
  • docker stop database2 => restart DD => whiteout
  • docker stop cache2 => restart DD => whiteout
  • docker rm directus2 => restart DD => working as expected!
  • Pushing the run button of the directus2 container in DD => whiteout
  1. I see that you still use the syntax supported by Docker Compose 1.x. Could you try to use docker-compose-v1 command instead of docker-compose? Recently I found out Docker Compose v2 (on MacOS) can affect whether volumes are working or not so I would try v1 just to test if it matters.

Didn’t know that docker-compose-v1 existed, nor anything about the differences of v1 and v2–thanks for pushing my nose to that! I have just taken the docker-compose.yml of the Directus docs and tried to get the system running with that. So I tried next:

  • removed all containers
  • removed all images
  • pruned all volumes (there where a lot, unused)
  • docker-compose-v1 up -d => DD whiteout, all three containers running

Removed everything again, removed the version entry from docker-compose.yml, then:

  • docker compose up -d => DD working just fine, no whiteout, all three containers running
  1. Since you wrote you have been using Docker Desktop for months, I would also try to delete dangling images, unused volumes and containers to make sure you have enough space in the virtual machine. A created container does not take up much space, but this is the last I can think of.

See 4. above

So, thanks a lot! I advanced a step further and got rid of the basic problem. Going to take a deeper dive into the evolution of docker compose… While skimming the docs, I found a command docker compose config. Is the output of that command the way I am supposed to write my docker-compose.yml (and what you probably meant by syntax of Docker Compose v2)?

Sorry I came from the Debian linux world where apt update is updating the repository cache and apt upgrade is updating the actual packages so I often use “upgrade”, but I am glad that you could make the Desktop work.