Home > Software design >  Provide args to Azure Container Instance entrypoint
Provide args to Azure Container Instance entrypoint

Time:01-26

With Docker, you can define CMD and ENTRYPOINT together such that the former becomes the arguments to the latter:

ENTRYPOINT [CMD]

This way, the end-user doesn't have to know or care about the entrypoint.

How can this be accomplished with Azure Container Instance? The documentation suggests that it can't, providing only --command-line which seems to replace both.

CodePudding user response:

The only way to overwrite ENTRYPOINT and CMD at run time is by using the --entrypoint flag when running a docker container. Do note that you can't overwrite the CMD without overwriting the ENTRYPOINT as well (unless the entrypoint is empty), and obviously the opposite is true too.

The article that you linked explains how --command-line can be used to overwrite ENTRYPOINT and CMD at run time, similarly to how you would do that with a docker run command.

  • Related