Commit Graph

35 Commits

Author SHA1 Message Date
Vaclav Struhar be219b3172 adding -c option for docker run/build in manpages
Signed-off-by: Vaclav Struhar <struharv@gmail.com>
2023-08-25 15:06:16 +02:00
Sebastiaan van Stijn 5355f2f639
Update man-page source MarkDown to work with go-md2man v2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-20 12:21:15 +02:00
Des Preston 8df7a9364f man/docker-build.1:fix --memory-swamp and --network, removing = between long-form opts and values
Signed-off-by: Des Preston <despreston@gmail.com>
2020-09-01 12:11:21 -04:00
Tonis Tiigi bc5fca913b docs: add missing cache-from man docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:11:05 +00:00
Tonis Tiigi d50472f52b docs: add docs for build —target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:11:05 +00:00
Ian Campbell 0808cf04cb Add `docker build --iidfile=FILE`
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-06-02 00:11:04 +00:00
Tony Abboud 174d9f0097 Add --add-host for docker build
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-06-02 00:10:56 +00:00
Michael b9c6e9ef21 [docs,man] Fixed typo (#29516)
Signed-off-by: Michael Käufl <docker@c.michael-kaeufl.de>
2017-06-02 00:10:45 +00:00
yuexiao-wang 4df2866d4e Fix the incorrect option name
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:44 +00:00
yuexiao-wang 378a9d816b Update the option 'network' for docker build
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:44 +00:00
lixiaobing10051267 bfa5aeec42 modify some urls related to reference path
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2017-06-02 00:10:42 +00:00
Brian Goff e34679982f Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:10:31 +00:00
sandyskies b4f6b6d970 add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:10:28 +00:00
YuPengZTE c8da630897 Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2017-06-02 00:10:25 +00:00
Paul Kehrer 9c85295b1c Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
2017-06-02 00:10:12 +00:00
Subhajit Ghosh 2f4d9eb6b1 Document valid chars in image name and tag
- Add link to valid image name and tag formats in referenced files
- Per review comments, updated docs to remove reference to `USERNAME` and
`REGISTRYHOST`.
- Per review comment, removed links from man page.
- Per review comment, added and updated examples on `docker tag`

Signed-off-by: Subhajit Ghosh <isubuz.g@gmail.com>
2017-06-02 00:07:39 +00:00
allencloud b45ed4a79d 1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations.

Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:07:35 +00:00
Harald Albers f3f9b34d2a docs for labels on build, networks and volumes
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:33 +00:00
Qiang Huang b87dd1342f Fix docs for memory-swap
Fixes: #18894

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:07:21 +00:00
Doug Davis 421578fbd4 remove =false from options that default to false in the docs
This re-aligns the docs with what the cmd line now does.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:07:21 +00:00
Boaz Shuster fbb25d42f0 Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-02 00:07:21 +00:00
Zhang Wei 67eea4d814 Add docs for option `--isolation`
Add docs for `run`/`create`/`build` command option `isolation`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-06-02 00:07:18 +00:00
NIWA Hideyuki fa2f024bc6 Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
2017-06-02 00:07:18 +00:00
Shijiang Wei 9d9976ae3a Add ability to add multiple tags with docker build
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2017-06-02 00:07:14 +00:00
Vincent Demeester 4c506e1df7 Deprecate -c cli short variant flag in docker cli
- build
- create

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:13 +00:00
Sally O'Malley 40ec99e60a add clarity/fix typos man/docker-build
add needed clarity for
1)  using STDIN to pass build context
2)  --cpu-shares flag use

also a few typos

Signed-off-by: Sally O'Malley <somalley@redhat.com>
2017-06-02 00:07:12 +00:00
Antonio Murdaca cbd33a2b27 Fix man and commandline docs
- missing help option in `docs/reference/commandline/*.md` (some files
  have it, the other I fixed didn't)
- missing `[OPTIONS]` in Usage description
- missing options
- formatting
- start/stop idempotence

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
2017-06-02 00:07:11 +00:00
Morgan Bauer b112dcfed4 fix typo in man page
- resolve #16536

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2017-06-02 00:07:10 +00:00
Madhav Puri 9fab23902f incorporate doc review comments
Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
2017-06-02 00:07:09 +00:00
Madhav Puri 40a2dac738 Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
2017-06-02 00:07:09 +00:00
Lei f793c1b50c Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:07:02 +00:00
Sally O'Malley bf09f5d572 Modify man pages for image-naming
This PR adds recommendations in man pages to use only [a-z0-9-_.] when
naming and tagging images.  The purpose of this is to add consistency
and to make image naming caps rules seem less arbitrary.

This PR addresses confusion with:
1. BaseImage:Tagged (not allowed)
2. baseimage:Tagged (allowed)
3. baseimage/tagged:V1 (allowed)
4. baseimage/Tagged:V1 (not allowed)

Signed-off-by: Sally O'Malley <somalley@redhat.com>
2017-06-02 00:07:01 +00:00
Moysés Borges d7b3d72cfc Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
2017-06-02 00:06:58 +00:00
Mary Anthony 2b50e0f852 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
2017-06-02 00:06:58 +00:00
Mary Anthony 77868b76b9 Moving man pages out of docs
Adding in other areas per comments
Updating with comments; equalizing generating man page info
Updating with duglin's comments
Doug is right here again;fixing.

Signed-off-by: Mary Anthony <mary@docker.com>
2017-06-02 00:06:57 +00:00