ERROR: In file './docker-compose.yml', service 'volumes' must be a mapping not an array

The thing is that you are not indenting the fields properly. Your docker-compose should look like the below:

registry:
  restart: always
  image: sudarshan/registry
  ports:
    - 5000:5000
  environment:
    REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt
    REGISTRY_HTTP_TLS_KEY: /certs/domain.key
    REGISTRY_AUTH: silly
    REGISTRY_AUTH_SILLY_SERVICE: SILLY_SERVICE
    REGISTRY_AUTH_SILLY_REALM: SILLY_REALM
  volumes:
    - /usr/certs:/certs