Difference between revisions of "Docker build"

From wikieduonline
Jump to navigation Jump to search
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
* <code>[[docker build .]]</code>
 
* <code>[[docker build .]]</code>
  
* <code>docker build -t my-image_name .</code>
+
* <code>[[docker build -t]] my-image_name .</code>
  
 
* <code>docker build -t my-image_name:my-tag .</code>
 
* <code>docker build -t my-image_name:my-tag .</code>
Line 54: Line 54:
 
* <code>[[docker load]]</code>
 
* <code>[[docker load]]</code>
 
* <code>[[docker-compose build]]</code>
 
* <code>[[docker-compose build]]</code>
* <code>docker [[buildx]] build .</code>
+
* <code>[[docker buildx]] build .</code>
 
* <code>[[docker tag]]</code>
 
* <code>[[docker tag]]</code>
 
* <code>tinit</code> [[init]] for containers
 
* <code>tinit</code> [[init]] for containers
* [[Kaniko]] ([[2018]])
 
* [[BuildKit]]
 
 
* <code>[[minikube image build]]</code>
 
* <code>[[minikube image build]]</code>
 
* <code>[[podman build]]</code>
 
* <code>[[podman build]]</code>
 
* <code>[[yarn build]]</code>
 
* <code>[[yarn build]]</code>
 +
* [[Kaniko]] ([[2018]])
 +
* [[BuildKit]]
  
 
== See also ==
 
== See also ==

Revision as of 11:25, 26 January 2023

docker build builds an image from a Dockerfile

--tag , -t		Name and optionally a tag in the 'name:tag' format
--platform=linux/amd64

Build an image without repo/tag/name

  • docker build -t my-image_name:my-tag .
  • docker build -t my-image_name:my-tag /path/to/your/code/and/dockerfile/
  • docker build --tag my-confluence-image-name --build-arg CONFLUENCE_VERSION=6.x.x
  • docker build -t myregistry.jfrog.io/backend/test --push --progress=plain .
  • docker build --build-arg arch=$arch -t your_artifactory.your_domain.com/test-multi-arch/busybox:$arch-test .
  • docker build --cache-from=

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

See also

Advertising: