I want to define a service in my GitHub action and override its entrypoint by adding arguments to it. How can I do this? Here’s what I’ve got right now that should sum up what I want to do…
Thanks for the answer. That create command is generated on GitHub’s side, I don’t have power over where the params are placed. That’s what I was pointing out in my question, that those parameters need to go at the end of the command GitHub is generating.
The params are what I need so just doing options: --entrypoint etcd won’t work.
It sounds like you’re saying though, that for services in a workflow you cannot override the entrypoint with arguments. Is that right? It seems odd to be able to use services like that but not have an entrypoint option that works like it does in a docker-compose, generating the command properly.
@chrispat This seems like a common ask, is it on the roadmap? I think we could support entrypoint+args on service containers similar to container actions
@carterbancroft You are correct that this is something we dont fully support at this time. Options was intended to allow arbitrary additional arguments but entrypoint is strange because of its positional requirements. While you can set the entrypoint alone, as you have noted you cant also provide the args to this entrypoint. At this time I think the only solution is to build the image yourself with the entrypoint + args defined in the Dockerfile
@dakalethanks for clarifying that, I really appreciate it. Your solution is basically what I wound up doing. Hopefully we’ll see this in a release at some point. Thanks again!
@dakale I’m also currently hitting a similar issue with services in GitHub Actions.
I would like to set up a MinIO instance for some integration tests but the official Docker image requires you to specify the command yourself like server /data. It doesn’t start without this. Currently there seems to be no way of defining the command and/or arguments by yourself so I have to use a custom Docker image now.
@dakale do you know if there are any plans to support this feature? Thanks for mentioning the workaround (building the image yourself with the correct args). I ended up calling docker run in my steps and then manually waited until the service is ready with until ...; do sleep 1; done. Using a service with args would definitely be more obvious and I could leverage service healthcheck which would be a big win too.