Undefined volume with Docker Compose

The Compose file also has a top-level volumes: block and you need to declare volumes there.

version: '3.9'
services:
  ca:
    volumes:
      - "step:/home/step"
    et: cetera
volumes:   # add this section
  step:    # does not need anything underneath this

There are additional options possible, but you do not usually need to specify these unless you need to reuse a preexisting Docker named volume or you need non-standard Linux mount options (the linked documentation gives an example of an NFS-mount volume, for example).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)