2.56. Docker build command

发布时间 : 2025-10-25 13:32:37 UTC      

Page Views: 10 views

Docker 命令大全

docker build The command is used to create a mirror using Dockerfile.

2.56.1. Grammar

docker build [OPTIONS] PATH | URL | - 

OPTIONS description:

  • –build-arg=[] : Set the variable when the mirror is created

  • –cpu-shares : Set cpu use weight

  • –cpu-period : Limit the period of CPU CFS

  • –cpu-quota : Limit CPU CFS quota

  • –cpuset-cpus : Specify the CPU id to use

  • –cpuset-mems : Specify the memory id used

  • –disable-content-trust : Ignore the check and turn it on by default

  • -f : Specify the Dockerfile path to use

  • –force-rm : Delete intermediate containers during setting up mirroring

  • –isolation : Use container isolation technology

  • –label=[] : Set the metadata used by the mirror

  • -m : Set the maximum memory value

  • –memory-swap : Set the maximum value of Swap to memory + swap, and “- 1” means unlimited swap

  • –no-cache : The process of creating a mirror does not use caching

  • –pull : Try to update the new version of the mirror

  • –quiet, -q : Quiet mode, only output image ID after success

  • –rm : Delete the intermediate container after setting the image successfully

  • –shm-size : Sets the size of / dev/shm. The default is 64m.

  • –ulimit : Ulimit configuration.

  • –squash : Compress all operations in Dockerfile into one layer.

  • –tag, -t: The name and label of the image, usually in name:tag or name format; you can set multiple tags for one image at a time.

  • –network: Default default. Set the network mode of the RUN instruction during the build

2.56.2. Example

Create an image using the Dockerfile of the current directory, labeled runoob/ubuntu:v1.

docker build -t runoob/ubuntu:v1 . 

Use URL github.com/creack/docker-firefox Create a mirror image with the Dockerfile of

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。