docker build

docker build

Description

Build an image from a Dockerfile

Usage

docker build [OPTIONS] PATH | URL | -

Options

Name, shorthand Default Description
--build-arg Set build-time variables
--cache-from Images to consider as cache sources
--cgroup-parent Optional parent cgroup for the container
--compress false Compress the build context using gzip
--cpu-period 0 Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota 0 Limit the CPU CFS (Completely Fair Scheduler) quota
--cpu-shares, -c 0 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 false Always remove intermediate containers
--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 default Set the networking mode for the RUN instructions during build
--no-cache false Do not use cache when building the image
--pull false Always attempt to pull a newer version of the image
--quiet, -q false Suppress the build output and print image ID on success
--rm true Remove intermediate containers after a successful build
--security-opt Security options
--shm-size Size of /dev/shm, default value is 64MB
--squash false Squash newly built layers into a single new layer
--tag, -t Name and optionally a tag in the ‘name:tag’ format
--ulimit Ulimit options

Parent command

Command Description
docker The base command for the Docker CLI.

© 2013–2016 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/build/

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部