Welcome to the Linux Foundation Forum!

Overriding container entrypoint at runtime

dzhigalindzhigalin Posts: 5
edited August 5 in LFS253 Class Forum

In Building Container Images there is a statement

But the executable/command provided during the build time cannot be overridden at runtime.

As far as I know we can use --entrypoint option to do exactly this at runtime - override the entrypoint that was given during build. Is it a mistake?

Comments

  • chrispokornichrispokorni Posts: 635

    Hi @dzhigalin,

    As opposed to RUN which is a buildtime instruction, both CMD and ENTRYPOINT are runtime instructions that provide or modify runtime commands and arguments, achieved as you mentioned above with the --entrypoint flag.

    Regards,
    -Chris

Sign In or Register to comment.