In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to use docker build command". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
description
The build command is used to build an image from Dockerfile
Usage docker build [OPTIONS] PATH| URL |- Parameter Options Name, shorthandDefault Description
--add-host Add custom host IP mapping (host:ip)
--build-arg Set build-time variable
--cache-from Set cache source mirror
--cgroup-parent Sets an optional parent cgroup for the container
--compress Build context using gzip compression
--cpu-period Limit CPU CFS (Completely Fair Scheduler) cycles
--cpu-quota Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-shares , -cCPU share (relative weight)
--cpuset-cpus Set CPU allowed to execute (0-3, 0,1)
--cpuset-memsAllowed MEMs to execute (0-3, 0,1)
--disable-content-trusttrue Skip mirror validation
--file , -fDockerfile name (Default is 'PATH/Dockerfile')
--force-rm Always delete intermediate containers
--iidfile Writes image ID to file
--isolation container isolation technology
--label Set metadata for mirror
--memory , -m memory limit
--memory-swapSwap limit equals memory plus Swap: '-1' can have unlimited swap
--networkAPI 1.25+
Set network mode for run instructions during build
--no-cache Do not use cache when building mirrors
--platformexperimental (daemon)API 1.32+
If the server is multiplatform, set the platform
--pull always tries to pick up a new version of the mirror
--quiet , -q Suppress build output and print image ID on a successful basis
--rmtrue Remove intermediate container after successful build--security-opt security option
--shm-size/dev/size of shm
--squashexperimental (daemon)API 1.25+
Compress the newly created layer into a new layer
--streamexperimental (daemon)API 1.31+
Stream attached to server to negotiate build context
--tag , -t Tag the image in 'name:tag' format
--target Set target build phase to build
--ulimitUlimit option
The parent command describes the basic commands of the dockerDocker CLI. extended description
docker build command builds docker image from Dockerfile and "context".
"docker build command how to use" the content of the introduction here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.