Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to specify arguments for container jobs and services #1152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seanyoung
Copy link

When specifying service containers for a jobs, sometimes it is necessary to add command line arguments to the container. See this example: https://github.community/t/how-do-i-properly-override-a-service-entrypoint/17435. Here it is useful to add --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 to the container start command line.

These arguments are simply passed after the image name on the docker create command line.

Here is another example of trying to add command line arguments to postgres: https://stackoverflow.com/questions/65438055/how-to-add-config-args-to-postgres-service-container-in-github-action

The options field cam be used to change the entrypoint of a container, but it is not possible to change the arguments.

Please let me know what else is required to make this mergable, thank you.

@seanyoung seanyoung requested a review from a team as a code owner June 12, 2021 10:32
@seanyoung
Copy link
Author

Another example is parity substrate. This container requires an argument, else an error is returned:

docker run --rm -it parity/substrate:latest
Error: Input("Please specify which chain you want to run, e.g. --dev or --chain=local")

vs

docker run --rm -it parity/substrate:latest --dev
2021-06-12 16:56:39  Running in --dev mode, RPC CORS has been disabled.    
2021-06-12 16:56:39  Substrate Node    
...

So without being able to add any arguments, it's impossible to have substrate as a service.

@abe-winter
Copy link

abe-winter commented Apr 27, 2024

bumping this in case it moves it up the queue

in many cases, the 'local emulator' image for key cloud services can only be configured with command line parameters. this is a primary use-case for the services feature of actions

a user can work around that by building their own image with an overridden CMD/ENTRYPOINT, but it would be so much better for actions to expose this ability directly; it is core docker functionality

there are multiple requests for this out in the wild:

gitlab has had this for decades: https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#override-the-entrypoint-of-an-image

@Blizter
Copy link

Blizter commented Sep 12, 2024

Hello,

Building, and Maintaining custom images everytime we want to pass a specific entrypoint is extremely painful.

Any news regarding the merge of this PR for passing custom CMD/entrypoints to container services?

@plutov
Copy link

plutov commented Nov 21, 2024

Hey,

any update on this? Service containers are unusable to me as is without being able to override CMD.

@rob-apella
Copy link

bump - is this good to go? lgtm

@mmizutani
Copy link

mmizutani commented Dec 9, 2024

@AllanGuigou @TingluoHuang @rentziass @benwells
Could you please assign a new reviewer for this highly anticipated but overlooked PR?
This PR requires re-approval for merge, but more than three years passed since the original reviewer approved this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants