Getting error while running docker run with flyway image

Hi Everyone,

i am trying to run “docker run” command in jenkins groovy to deploy my mssql files with the help of flyway-docker image.

my flyway-docker image is in nexus repository, and mssql files are in bitbucket repository.

in my groovy i am calling nexus and bitbucket repositories and running the docker run command. The command is below,

docker run --rm -v ${WORKSPACE}/Docker_flyway/VM/sql:/flyway/sql -v ${WORKSPACE}/Docker_flyway/conf:/flyway/conf flyway_pos:v0.1.0 migrate

i am getting below error:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: “migrate”: executable file not found in $PATH: unknown.

i tried multiple ways but i am not able to run the command. could you please anyone can help me out here.

It’s an expectation problem… You expect the image to have flyway as entrypoint script, so that it’s sufficient to use the flyway argument migrate as command. According the error message, it is not the case.

Use flyway migrate instead. If flyway is not covered by the PATH variable, make sure to use the absolute path to the flyway command.

If you want to learn more about how ENTRYPOINT and CMD play together, you might want to look at this blog post of @rimelek:

I moved your post to the General Discussion / General category, as It is not related to CI/CD on Docker Hub.

Thanks for the response. after i modified the command i am getting the following error
No port specified: :/tcp.

after this error i added -p hostport:containerport, even though i am getting same error.

We are here to help you to help yourself. This means the heavy part is on your side, and we guide you with pointers on what needs to be done or understood to solve it yourself. You still have to build up the understanding yourself.

This is why I shared the link to the article about how to “constructing commands”.

Furthermore, to prevent ambiguity, instead of sharing snippets of parameters and error messages, please share the exact command and the copy/pasted complete error line from logs.