wework / speccy

Well Spectually 🤓 Enforce quality rules on your OpenAPI 3.0.x specifications.
http://speccy.io
MIT License
824 stars 78 forks source link

[Docker] EISDIR: illegal operation on a directory, read #378

Open ReganRyanNZ opened 4 years ago

ReganRyanNZ commented 4 years ago

Detailed description

I am trying to run this line in gitlab ci:

docker run -v $(pwd)/crewmeister.yaml:/crewmeister.yaml wework/speccy lint /crewmeister.yaml

And it crashes with these logs:

Running with gitlab-runner 12.3.0 (a8a019e0)
  on Hetzner Cloud 195.201.134.35 gWew9yjP
Using Docker executor with image docker ...
Pulling docker image docker ...
Using docker image sha256:8e347affc72a211a0fa374a5a4b0cacc9bcdf83c3dedbceb971ea41f82d29eb1 for docker ...
Running on runner-gWew9yjP-project-33-concurrent-0 via gitlab-runner...
Fetching changes...
Reinitialized existing Git repository in /builds/crewmeister/api/.git/
Checking out 31fc7fa4 as master...

Skipping Git submodules setup
$ docker run -v $(pwd)/crewmeister.yaml:/crewmeister.yaml wework/speccy lint /crewmeister.yaml
Could not open file: EISDIR: illegal operation on a directory, read
ERROR: Job failed: exit code 1

I have tried:

And none of the above have changed the error.

Is there any way to fix this? Or even just get more information? What file is it trying to read?

m-idler commented 4 years ago

I guess you are missing the /project part in the target, for me it works like this:

docker run -v $(PWD)/openapi.yml:/project/openapi.yml wework/speccy lint openapi.yml