Editing Docker build

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}}
+
{{Draft}}
<code>docker build</code> builds an image from a <code>[[Dockerfile]]</code>
 
* https://docs.docker.com/engine/reference/commandline/build/
 
[[--tag]] , -t Name and optionally a tag in the 'name:tag' format
 
[[--platform]]=[[linux/amd64]]
 
[[docker build --help|--help]]
 
  
== Build an image without repo/tag/name ==
 
* <code>[[docker build .]]</code>
 
  
* <code>[[docker build -t]] my-image_name .</code>
+
docker build --tag my-confluence-image --build-arg CONFLUENCE_VERSION=6.x.x
  
* <code>docker build -t my-image_name:my-tag .</code>
+
==Related commands ==
 
 
* <code>docker build -t my-image_name:my-tag /path/to/your/code/and/dockerfile/</code>
 
 
 
* <code>docker build [[--tag]] my-confluence-image-name --build-arg [[CONFLUENCE]]_VERSION=6.x.x</code>
 
 
 
* <code>docker build -t myregistry.jfrog.io/backend/test --push --progress=plain .</code>
 
 
 
* <code>docker build -t [[openalpr]] https://github.com/openalpr/openalpr.git</code>
 
 
* <code>docker build --[[build-arg]] [[arch]]=$arch -t your_artifactory.your_domain.com/test-multi-arch/busybox:$arch-test .</code>
 
 
 
* <code>-t Tag an image https://docs.docker.com/engine/reference/commandline/build/#tag-an-image--t</code>
 
 
 
* <code>docker build [[--cache-from]]=</code>
 
 
 
* <code>[[docker build --platform]]=linux/[[amd64]]</code>
 
 
 
== Examples with errors ==
 
docker build
 
"docker build" requires exactly 1 argument.
 
See '[[docker build --help]]'.
 
 
Usage:  docker build [OPTIONS] PATH | URL | -
 
 
Build an image from a [[Dockerfile]]
 
 
 
 
 
docker build .
 
[+] Building 0.0s (2/2) FINISHED
 
=> [internal] load build definition from [[Dockerfile]]                                            0.0s
 
=> => transferring dockerfile: 2B                                                              0.0s
 
=> CANCELED [internal] load [[.dockerignore]]                                                      0.0s
 
=> => transferring context:                                                                    0.0s
 
failed to solve with frontend [[dockerfile.v0]]: failed to read dockerfile: open [[/var/lib/docker/]]tmp/buildkit-mount071917527/Dockerfile: no such file or directory
 
 
 
== Related terms ==
 
* <code>[[Dockerfile]]</code>, [[FROM]]
 
* <code>[[docker run]]</code>
 
* <code>[[docker push]]</code>
 
* <code>[[docker pull]]</code>
 
 
* <code>[[docker save]]</code>
 
* <code>[[docker save]]</code>
 
* <code>[[docker load]]</code>
 
* <code>[[docker load]]</code>
 +
* <code>[[tar]]</code>
 
* <code>[[docker-compose build]]</code>
 
* <code>[[docker-compose build]]</code>
* <code>[[docker buildx]] build .</code>
 
* <code>[[docker tag]]</code>
 
* <code>tinit</code> [[init]] for containers
 
* <code>[[minikube image build]]</code>
 
* <code>[[podman build]]</code>
 
* <code>[[yarn build]]</code>
 
* [[Kaniko]] ([[2018]])
 
* [[BuildKit]]
 
* <code>[[docker buildx prune]]</code>
 
* <code>[[buildah]]</code>
 
  
 
== See also ==
 
== See also ==
* {{docker build}}
+
* {{Docker}}
* {{Build}}
+
 
 +
 
  
 
[[Category:Docker]]
 
[[Category:Docker]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: