Docker Community Forums

Share and learn in the Docker community.

Docker Compose for Windows not starting all services

Docker-compose for Windows starts all services except for my database service when the system boots or the docker daemon is restarted.

Information

  • Windows Version: Windows 10 Professional
  • Docker Desktop Version:
    Version 2.0.0.3 (31259)
    Channel: stable
    Build: 8858db3

This problem recently started occurring.

I have a service in Compose called percona which starts the MySQL Percona instance. The YML looks like this:

  percona:
    image: ${REGISTRY}/thedatabase:latest
    volumes:
      - perconadata:/var/lib/mysql
      - ./.env:/tmp/.env
    #restart: unless-stopped
    restart: always
    environment:
      ENV_PROPERTIES_FILE: ${ENV_FULLPATH}
      MYSQL_ROOT_PASSWORD: XXXXX
      TZ: ${TIMEZONE}
    ports:
      - "3306:3306"
    extra_hosts:
      - "myhost:${MYHOST}"
    networks:
      - mc-net

… lots of other services…

###############################################

volumes:
  perconadata:

– end of file –

This service uses a root level volume with no attributes for data storage.

Tried setting restart policy to always and unless-stopped with no change.

It WILL start if I open a Windows Bash shell and:

  • Run “docker-compose up -d percona”
  • Run “docker-compose down; docker-compose up”
  • Run “docker-compose start percona”

No error messages show up in the container log file or on the console, its as if the service is invisible to the daemon.

The same compose file works fine on Linux and used to work fine on Windows. Now, however, when the system is restarted or if docker is restarted, it does NOT start the service.

It seems to be related only to this one service and only on Windows.

Steps to reproduce the behavior

  1. Create a compose file like above
  2. Restart Docker Daemon on Windows or restart the computer