-
Notifications
You must be signed in to change notification settings - Fork 462
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
Add support for user defined entrypoint in containers #1341
Conversation
Did you... read my mind? #1342 |
@@ -578,6 +578,11 @@ private async Task CreateContainersAsync(IEnumerable<AppResource> containerResou | |||
} | |||
} | |||
|
|||
if (modelContainerResource is ContainerResource containerResource) | |||
{ | |||
dcpContainerResource.Spec.Command = containerResource.Entrypoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this conflating CMD and ENTRYPOINT? https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it? I don't have visibility into what command maps to internally in dcp, but I was told this is for entrypoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a question for @karolz-ms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DCP is attempting to bypass the whole command vs entrypoint madness, it has just one option, Command
which if set, that is the binary that will be run, no exceptions. So it is the equivalent of --entrypoint
(and --entrypoint
is the option that is used under the covers with Docker).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So with DCP it's currently not possible to just pass args to a container's pre-defined entry point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, you just use Args
property for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok it makes sense now. I was confused how this was working using just the existing WithArgs
method, but it turns out it's because the mssql container is defined like this:
44be418
to
805de04
Compare
Should we add more
AddContainer
overloads for entrypoint? Should we add aWithEntrypoint
extension method?Microsoft Reviewers: Open in CodeFlow