-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Command not running when docker container has an ENTRYPOINT #2219
Comments
This suggest you don't understand the difference between |
Entrypoint is clearly mentioned here: Line 113 in e9961ef
There seems to be some general confusion regarding the differences as well. Perhaps you can enlighten me regarding the actual differences? I believe nomad should be able to utilize the --entrypoint flag for docker run if requested. |
@rickardrosen Here is a pretty good explanation of the difference: http://stackoverflow.com/questions/21553353/what-is-the-difference-between-cmd-and-entrypoint-in-a-dockerfile Entrypoint is useful when treating the container as a binary and that is why you are seeing the command/args being appended. Is your ask to have entry point be overridable? |
Ideally I want to be able to tell the container exactly what to do, when scheduling it. Our current use case is as follows: As it stands now, I will have to build a custom version of a container if it contains an entrypoint. In general I think that being able to override the entrypoint would be a nice feature, or even an expected one, when setting command and args through a job. |
@rickardrosen I will mark it as an enhancement and hopefully get it in soon! As for expected behavior, I don't the we will ever override the entry point because it is usually set when building the container so it behaves in a particular way! Either way we will get this in and hopefully make your life a bit easer 😄 |
Thanks Dadgar! The reason I ended up here is that we're forced to use containerpilot. |
Yes we would like to solve that but it I do not have a date to give out on that one! Sorry! |
@rickardrosen I'm still confused about the ask. If you want to invoke whatever you provide under "command" and "args" to the Nomad task, then you'd not want to set an |
@dvusboy: exactly, it is not my image, and I'd prefer not keep a registry with modified containers, just to inject containerpilot. |
In that case, it sounds like you're asking for the support of |
Well it depends on how you view it. Either way, the end result will be the same: the specified command will be run. |
ah this would be a great feature! # |
@rickardrosen That part really depends on the implementation of the entrypoint to the Docker image. Some scripts allow pass-thru, some don't. You can't expect Nomad to control this outside of providing explicit support of |
@dvusboy I have no such expectations =) Support for --entrypoint would be perfect for our scenario as it will allow overriding whatever our devs and others want to run, prepending that with containerpilot when scheduling. |
Just wanted to note that Nomad 0.6 will advertise the Docker network driver IP automatically, so containerpilot shouldn't be necessary: https://www.nomadproject.io/docs/job-specification/service.html#address_mode Leaving this issue open as its for a more generic feature than just customizing advertisement. |
@schmichael Does that include the built-in |
@dvusboy |
Thanks, @schmichael, the code is a bit dense to trace. So, if I'm using the Docker driver, and under |
It is unfortunately dense, and the docs could definitely use expanding. I don't think this little blurb helps either: https://www.nomadproject.io/docs/drivers/docker.html#advertising-container-ips Docs PRs always welcome, but I'll see if there's anything I can do.
Correct! The default of
|
One use case where one wants to override the |
Do we have any movement on this? |
ak, I need to override entrypoint as well... |
Hey all we are looking into this for 0.8 |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
0.5.1
Operating system and Environment details
Ubuntu 16.10
Docker version 1.13.0, build 49bf474
Issue
A dockerfile with an
ENTRYPOINT ["/run.sh"]
When I schedule it with:
docker ps
shows COMMAND:/run.sh /local/containerpilot -config file:///local/containerpilot.json /run.sh
I would expect the COMMAND to be:
/local/containerpilot -config file:///local/containerpilot.json /run.sh
The text was updated successfully, but these errors were encountered: