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

  • Deployment with Docker
  • Srdjan Grubor
  • 158字
  • 2021-07-02 23:22:12

Extending another container with FROM

Similar to our last container, our FROM nginx:latest line ensures that we are using the latest version of a base image, but instead of Ubuntu, here, we will use NGINX as our base. The latest ensures that we get the image with the latest features and often patches too at a slight risk of breakages and API incompatibility in the future.

When writing your Docker containers, you will often have to make these trade-off decisions based on your situation and stability requirements, but the NGINX API has been very stable for years now, so in this specific case, we do not need the stability that the named tags provide. If we wanted one of those tagged versions here, latest would just change to the version we wanted that is offered on Docker Hub, which we can find at https://hub.docker.com/_/nginx/ , so something like FROM nginx:1.13 would have been perfectly fine too.

主站蜘蛛池模板: 天台县| 南岸区| 团风县| 金平| 玉山县| 许昌县| 赫章县| 家居| 千阳县| 宜川县| 崇州市| 大厂| 鹰潭市| 武山县| 中卫市| 苏州市| 海晏县| 马尔康县| 江津市| 习水县| 和政县| 夏津县| 礼泉县| 湾仔区| 通海县| 加查县| 溧水县| 桂平市| 呼伦贝尔市| 罗平县| 泰宁县| 天长市| 河源市| 黄骅市| 洪雅县| 读书| 龙江县| 泸定县| 孟连| 兴宁市| 双峰县|