DOCKER_BUILDKIT=0
before using the docker build
command:$ DOCKER_BUILDKIT=0 docker build [OPTIONS] PATH | URL | -This disables Docker BuildKit, which is now the default builder and offers improved performance, output, and caching. It's recommended to enable BuildKit (
DOCKER_BUILDKIT=1
) or simply omit the variable.-t, --tag list Name and optionally a tag in the 'name:tag' format -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile') -q, --quiet Suppress the build output and print image ID on success --no-cache Do not use cache when building the image --cache-from strings Images to consider as cache sources --pull Always attempt to pull a newer version of the image --build-arg list Set build-time variables --add-host list Add a custom host-to-IP mapping (host:ip) --rm Remove intermediate containers after a successful build (default true) --force-rm Always remove intermediate containers --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota -c, --cpu-shares int CPU shares (relative weight) --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1) --cpuset-mems string MEMs in which to allow execution (0-3, 0,1) -m, --memory bytes Memory limit --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap --cgroup-parent string Optional parent cgroup for the container --compress Compress the build context using gzip --disable-content-trust Skip image verification (default true) --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") -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") --secret stringArray Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret --security-opt strings Security options --shm-size bytes Size of /dev/shm --squash Squash newly built layers into a single new layer --ssh stringArray 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 --target string Set the target build stage to build. --ulimit ulimit Ulimit options (default [])