Adding your own setup to the container 

When you are working with a container that includes code and systems you didn't create, you may find yourself wanting to set up some environment variables or otherwise establish some configuration files before whatever process in the container gets run. This is extremely common when using other prebuilt open source software, especially software that doesn't already have a well-established container that you can utilize.

A common technique for handling this situation is to add a shell script into the container and then have the entrypoint and arguments set to run that script. If you do this, make sure you include the appropriate options for invoking the script.

A common example is to invoke a script ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.