官术网_书友最值得收藏!

Getting options for your executable code

Aside from the ENTRYPOINT and CMD defined when you create your container, a container image can also define environment variables, usually via the ENV command when creating the container image. The ENTRYPOINT, CMD, and the environment variables can be overwritten or updated at execution time or when defining a deployment. Environment variables therefore become one of the most common ways of passing in configuration to your container.

Writing your software to utilize these environment variables will be important. As you create your software, make sure that you can take advantage of environment variables as well as command-line arguments in your code. Most languages have a library that will support options as either command-line arguments or environment variables.

In our next chapter, we will see how to set up configurations and pass them to your container at deployment time.

主站蜘蛛池模板: 雷州市| 蒲城县| 郎溪县| 侯马市| 长葛市| 宜君县| 昌江| 南平市| 新宁县| 扶绥县| 崇左市| 遂溪县| 寿光市| 德安县| 新蔡县| 永康市| 连州市| 化州市| 长武县| 会同县| 黄冈市| 盘山县| 静海县| 长治市| 务川| 宁陵县| 洛浦县| 石城县| 乐至县| 崇义县| 汉源县| 曲周县| 禹城市| 大足县| 太湖县| 扎囊县| 五莲县| 博白县| 唐海县| 嵊州市| 资中县|