Closed elafontaine closed 9 months ago
hi @elafontaine
entrypoint for the docker image is openapi-spec-validator
command.
When you run the following:
docker run -it pythonopenapi/openapi-spec-validator /bin/sh
you run openapi-spec-validator
command with /bin/sh
as filename argument to validation. This will of course fail.
If you want to override entry point to use shell you need to use --entrypoint
option:
docker run --entrypoint /bin/sh -it pythonopenapi/openapi-spec-validator
Read more about docker run command and --entrypoint
option:
https://docs.docker.com/engine/reference/commandline/run/
Yup, just realized. Thanks a lot for your time, really sorry about this.
the solution ;
image:
name: pythonopenapi/openapi-spec-validator
entrypoint: [""]
Can't run this image as part of a CI as the
sh
isn't working for some reason.I have a team using the python module, but, do to our corporate policies, they have to do a lot of gymnastics to make it work. If the docker image were to work with
sh
, we would be able to use it in our CI directly.The error I get locally when trying to start the
sh
program is ;On a x86 PC of a colleague, he gets ;
On the gitlab-ci run we get a different error, my guess being that gitlab runs the script outside the image to find the right binary to execute from within the image ;
Please let me know if you can reproduce or not. I'm just wondering what I'm doing wrong if I'm doing something wrong.
BTW, running the image on a specific file returns a "OK" message, but I don't get what's going on.