From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- ...erence%2Fcommandline%2Fimage_build%2Findex.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 devdocs/docker/engine%2Freference%2Fcommandline%2Fimage_build%2Findex.html (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fimage_build%2Findex.html') diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fimage_build%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fimage_build%2Findex.html new file mode 100644 index 00000000..a423f48c --- /dev/null +++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fimage_build%2Findex.html @@ -0,0 +1,22 @@ +

docker image build


Build an image from a Dockerfile

Usage

$ docker image build [OPTIONS] PATH | URL | -
+

Options

Name, shorthand Default Description
--add-host Add a custom host-to-IP mapping (host:ip)
--build-arg Set build-time variables
--cache-from Images to consider as cache sources
--cgroup-parent Optional parent cgroup for the container
--compress Compress the build context using gzip
--cpu-period Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota Limit the CPU CFS (Completely Fair Scheduler) quota
+--cpu-shares , -c + CPU shares (relative weight)
--cpuset-cpus CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems MEMs in which to allow execution (0-3, 0,1)
--disable-content-trust true Skip image verification
+--file , -f + Name of the Dockerfile (Default is 'PATH/Dockerfile')
--force-rm Always remove intermediate containers
--iidfile Write the image ID to the file
--isolation Container isolation technology
--label Set metadata for an image
+--memory , -m + Memory limit
--memory-swap Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--network Set the networking mode for the RUN instructions during build
--no-cache Do not use cache when building the image
+--output , -o + +API 1.40+
Output destination (format: type=local,dest=path)
--platform +API 1.40+
Set platform if server is multi-platform capable
--progress auto Set type of progress output (auto, plain, tty). Use plain to show container output
--pull Always attempt to pull a newer version of the image
+--quiet , -q + Suppress the build output and print image ID on success
--rm true Remove intermediate containers after a successful build
--secret Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
--security-opt Security options
--shm-size Size of /dev/shm
--squash +experimental (daemon)
Squash newly built layers into a single new layer
--ssh SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
--stream Stream attaches to server to negotiate build context
+--tag , -t + Name and optionally a tag in the 'name:tag' format
--target Set the target build stage to build.
--ulimit Ulimit options

Parent command

Command Description
docker image Manage images
Command Description
docker image build Build an image from a Dockerfile
docker image history Show the history of an image
docker image import Import the contents from a tarball to create a filesystem image
docker image inspect Display detailed information on one or more images
docker image load Load an image from a tar archive or STDIN
docker image ls List images
docker image prune Remove unused images
docker image pull Pull an image or a repository from a registry
docker image push Push an image or a repository to a registry
docker image rm Remove one or more images
docker image save Save one or more images to a tar archive (streamed to STDOUT by default)
docker image tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
+

+ © 2019 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.
+ https://docs.docker.com/engine/reference/commandline/image_build/ +

+
-- cgit v1.2.3