-1

I'm trying to start a multi containers applications for codeceptjs using docker-compose. On linux the docker compose yml file works fine but on windows it fails complaining about "volume name is too short". Why docker compose complains on Windows ?

Here's the yml file content:

version: '3.7'

services:
  hub:
    image: selenium/hub:latest
    [...]

  chrome:
    image: selenium/node-chrome:latest
    volumes:
      - /dev/shm:/dev/shm
    environment:
      [...]
    networks:
        test_network:
          ipv4_address: 10.2.0.3

  test-acceptance:
    image: test/codeceptjs
    [...]
    volumes:
      - $WORKSPACE:/tests
      - node_modules:/node_modules
    networks:
        test_network:
          ipv4_address: 10.2.0.5

volumes:
  node_modules:

networks:
    test_network:
      driver: bridge
      ipam:
        driver: default
        config:
          -
            subnet: 10.2.0.0/24

X

user3611522
  • 81
  • 1
  • 11

1 Answers1

0

Maybe it's just a typo but the offending values are probably here:

volumes:
  node_modules:

You need to put something after the colon.

StephaneM
  • 4,779
  • 1
  • 16
  • 33
  • According to the official documentation https://docs.docker.com/compose/compose-file/ (see Volumes section), the syntax is correct, like in the shown example in this document, the volumes declaration is volumes: : – user3611522 Oct 10 '19 at 10:33