- Deployment with Docker
- Srdjan Grubor
- 200字
- 2021-07-02 23:22:13
Labels
Our first new directive here is LABEL:
LABEL version="1.0"
LABEL org.sgnn7.name="python-webserver"
LABEL <key>=<value> or LABEL <key> <value> is used to add metadata about the image that is being built, which can later be examined and filtered by docker ps and docker images using something like docker images --filter "<key>=<value>". Keys are generally all lowercase in the reverse-dns notation, but you can use anything you want here and version should be present on every image, so we use the top-level version key name. However, the version here is not only there so that we can filter images but also to break Docker's cache if we change it. Without cache-busting of this sort or through the manually set flag during builds ( docker build --no-cache ), Docker will keep reusing the cache all the way up to the most recently changed directive or files so there is a high probability that your container will stay stuck in a frozen package configuration. This condition may or may not be what you want, but just in case you have automated build tooling, adding a version layer that can break the cache whenever you change it makes the container very easy to update.
- 大數據項目管理:從規劃到實現
- 腦動力:Linux指令速查效率手冊
- Natural Language Processing Fundamentals
- 最后一個人類
- Python Algorithmic Trading Cookbook
- Mastering Elastic Stack
- Windows程序設計與架構
- 自動化控制工程設計
- 深度學習與目標檢測
- 電子設備及系統人機工程設計(第2版)
- Mastering pfSense
- 從零開始學Java Web開發
- 計算智能算法及其生產調度應用
- 中國戰略性新興產業研究與發展·數控系統
- Appcelerator Titanium Smartphone App Development Cookbook(Second Edition)