File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -553,13 +553,37 @@ the daemon runs the containers used in the build with the
553553### <a name =" file " ></a > Specify a Dockerfile (-f, --file)
554554
555555``` console
556- $ docker buildx build -f < filepath > .
556+ $ docker buildx build -f [PATH | URL | -] .
557557```
558558
559- Specifies the filepath of the Dockerfile to use.
559+ Specifies the location of the Dockerfile to use.
560560If unspecified, a file named ` Dockerfile ` at the root of the build context is used by default.
561561
562- To read a Dockerfile from stdin, you can use ` - ` as the argument for ` --file ` .
562+ The supported inputs formats are:
563+
564+ - [ ` Local file path ` ] ( #local-file-path )
565+ - [ ` Remote URL ` ] ( #remote-url )
566+ - [ ` Standard input ` ] ( #standard-input )
567+
568+ #### Local file path
569+
570+ To specify a path to a local Dockerfile:
571+
572+ ``` console
573+ $ docker buildx build -f path/to/Dockerfile .
574+ ```
575+
576+ #### Remote URL
577+
578+ To specify a URL to a remote Dockerfile:
579+
580+ ``` console
581+ $ docker buildx build -f https://raw.githubusercontent.com/docker/buildx/refs/tags/v0.29.0/Dockerfile .
582+ ```
583+
584+ #### Standard input
585+
586+ To read a Dockerfile from stdin, use ` - ` as the argument:
563587
564588``` console
565589$ cat Dockerfile | docker buildx build -f - .
You can’t perform that action at this time.
0 commit comments