Difference between revisions of "Docker build --help"

From wikieduonline
Jump to navigation Jump to search
(Created page with " docker build --help <pre> Usage: docker build [OPTIONS] PATH | URL | - Build an image from a Dockerfile Options: --add-host list Add a custom host-to-IP...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lc}}
 +
[[docker build]] --help
  
docker build --help
 
<pre>
 
  
Usage:  docker build [OPTIONS] PATH | URL | -
+
Usage:  docker build [OPTIONS] PATH | URL | -
 
+
Build an image from a Dockerfile
+
Build an image from a Dockerfile
 
+
Options:
+
Options:
 
       --add-host list          Add a custom host-to-IP mapping (host:ip)
 
       --add-host list          Add a custom host-to-IP mapping (host:ip)
 
       --build-arg list          Set build-time variables
 
       --build-arg list          Set build-time variables
Line 19: Line 19:
 
       --no-cache                Do not use cache when building the image
 
       --no-cache                Do not use cache when building the image
 
   -o, --output stringArray      Output destination (format: type=local,dest=path)
 
   -o, --output stringArray      Output destination (format: type=local,dest=path)
       --platform string        Set platform if server is multi-platform capable
+
       [[--platform]] string        Set platform if server is multi-platform capable
 
       --progress string        Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
 
       --progress string        Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
 
       --pull                    Always attempt to pull a newer version of the image
 
       --pull                    Always attempt to pull a newer version of the image
Line 25: Line 25:
 
       --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
 
       --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
 
       --ssh stringArray        SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
 
       --ssh stringArray        SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
   -t, --tag list                Name and optionally a tag in the 'name:tag' format
+
   -t, [[--tag]] list                Name and optionally a tag in the 'name:tag' format
 
       --target string          Set the target build stage to build.
 
       --target string          Set the target build stage to build.
</pre>
 
  
  

Latest revision as of 10:30, 19 February 2024

docker build --help


Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
     --add-host list           Add a custom host-to-IP mapping (host:ip)
     --build-arg list          Set build-time variables
     --cache-from strings      Images to consider as cache sources
     --disable-content-trust   Skip image verification (default true)
 -f, --file string             Name of the Dockerfile (Default is 'PATH/Dockerfile')
     --iidfile string          Write the image ID to the file
     --isolation string        Container isolation technology
     --label list              Set metadata for an image
     --network string          Set the networking mode for the RUN instructions during build (default "default")
     --no-cache                Do not use cache when building the image
 -o, --output stringArray      Output destination (format: type=local,dest=path)
     --platform string         Set platform if server is multi-platform capable
     --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
     --pull                    Always attempt to pull a newer version of the image
 -q, --quiet                   Suppress the build output and print image ID on success
     --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
     --ssh stringArray         SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
 -t, --tag list                Name and optionally a tag in the 'name:tag' format
     --target string           Set the target build stage to build.


See also[edit]

Advertising: